~ubuntu-branches/debian/sid/clamav/sid

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/lib/VMCore/IRBuilder.cpp

  • Committer: Package Import Robot
  • Author(s): Andreas Cadhalpun, Andreas Cadhalpun, Sebastian Andrzej Siewior, Frans Spiesschaert
  • Date: 2014-10-15 06:50:20 UTC
  • mfrom: (1.3.13) (42.1.4 experimental)
  • Revision ID: package-import@ubuntu.com-20141015065020-0cpy1hdueggaw35s
Tags: 0.98.5~rc1+dfsg-1
[ Andreas Cadhalpun ]
* Import new upstream release candidate.
* Drop patches included upstream and update the others.
* Add 4 new symbols to libclamav6.symbols.
* Fix debian/copyright.
* Update lintian overrides.
* Update Standards-Version to 3.9.6 (no changes needed).
* Add Breaks and Replaces for old clamd package to clamdscan.
* Remove unnecessary shlibs:Depends from clamav-dbg.
* Add patches to support LLVM 3.5.

[ Sebastian Andrzej Siewior ]
* Add embedded copy of libmspack to be used as fallback, when libmspack-dev
  is not available.

[ Frans Spiesschaert ]
* Updated Dutch Debconf template translation (Closes: #763634)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
//===---- IRBuilder.cpp - Builder for LLVM Instrs -------------------------===//
2
 
//
3
 
//                     The LLVM Compiler Infrastructure
4
 
//
5
 
// This file is distributed under the University of Illinois Open Source
6
 
// License. See LICENSE.TXT for details.
7
 
//
8
 
//===----------------------------------------------------------------------===//
9
 
//
10
 
// This file implements the IRBuilder class, which is used as a convenient way
11
 
// to create LLVM instructions with a consistent and simplified interface.
12
 
//
13
 
//===----------------------------------------------------------------------===//
14
 
 
15
 
#include "llvm/Support/IRBuilder.h"
16
 
#include "llvm/GlobalVariable.h"
17
 
#include "llvm/Function.h"
18
 
#include "llvm/LLVMContext.h"
19
 
using namespace llvm;
20
 
 
21
 
/// CreateGlobalString - Make a new global variable with an initializer that
22
 
/// has array of i8 type filled in with the nul terminated string value
23
 
/// specified.  If Name is specified, it is the name of the global variable
24
 
/// created.
25
 
Value *IRBuilderBase::CreateGlobalString(const char *Str, const Twine &Name) {
26
 
  Constant *StrConstant = ConstantArray::get(Context, Str, true);
27
 
  Module &M = *BB->getParent()->getParent();
28
 
  GlobalVariable *GV = new GlobalVariable(M, StrConstant->getType(),
29
 
                                          true, GlobalValue::InternalLinkage,
30
 
                                          StrConstant, "", 0, false);
31
 
  GV->setName(Name);
32
 
  return GV;
33
 
}
34
 
 
35
 
const Type *IRBuilderBase::getCurrentFunctionReturnType() const {
36
 
  assert(BB && BB->getParent() && "No current function!");
37
 
  return BB->getParent()->getReturnType();
38
 
}