aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-05 22:41:43 +0000
committerOwen Anderson <resistor@mac.com>2009-07-05 22:41:43 +0000
commit0a205a459884ec745df1c529396dd921f029dafd (patch)
tree905109491ef6c2ea3d99d01fc48af9c2c633e645 /include
parentdb882950f3bcf7f710843610e917988daeafffc2 (diff)
downloadexternal_llvm-0a205a459884ec745df1c529396dd921f029dafd.zip
external_llvm-0a205a459884ec745df1c529396dd921f029dafd.tar.gz
external_llvm-0a205a459884ec745df1c529396dd921f029dafd.tar.bz2
More LLVMContext-ification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74807 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/BasicBlock.h5
-rw-r--r--include/llvm/Function.h2
-rw-r--r--include/llvm/LLVMContext.h2
-rw-r--r--include/llvm/Transforms/Utils/PromoteMemToReg.h2
-rw-r--r--include/llvm/Transforms/Utils/ValueMapper.h3
5 files changed, 12 insertions, 2 deletions
diff --git a/include/llvm/BasicBlock.h b/include/llvm/BasicBlock.h
index 072f615..59b93e8 100644
--- a/include/llvm/BasicBlock.h
+++ b/include/llvm/BasicBlock.h
@@ -22,6 +22,7 @@
namespace llvm {
class TerminatorInst;
+class LLVMContext;
template<> struct ilist_traits<Instruction>
: public SymbolTableListTraits<Instruction, BasicBlock> {
@@ -85,6 +86,10 @@ private:
explicit BasicBlock(const std::string &Name = "", Function *Parent = 0,
BasicBlock *InsertBefore = 0);
public:
+ /// getContext - Get the context in which this basic block lives,
+ /// or null if it is not currently attached to a function.
+ LLVMContext* getContext() const;
+
/// Instruction iterators...
typedef InstListType::iterator iterator;
typedef InstListType::const_iterator const_iterator;
diff --git a/include/llvm/Function.h b/include/llvm/Function.h
index 34ced97..db728bf 100644
--- a/include/llvm/Function.h
+++ b/include/llvm/Function.h
@@ -129,7 +129,7 @@ public:
/// getContext - Return a pointer to the LLVMContext associated with this
/// function, or NULL if this function is not bound to a context yet.
- LLVMContext* getContext();
+ LLVMContext* getContext() const;
/// isVarArg - Return true if this function takes a variable number of
/// arguments.
diff --git a/include/llvm/LLVMContext.h b/include/llvm/LLVMContext.h
index efe12cc..b3b9460 100644
--- a/include/llvm/LLVMContext.h
+++ b/include/llvm/LLVMContext.h
@@ -166,6 +166,7 @@ public:
Constant* getConstantExprInsertValue(Constant* Agg, Constant* Val,
const unsigned* IdxList,
unsigned NumIdx);
+ Constant* getConstantExprSizeOf(const Type* Ty);
Constant* getZeroValueForNegation(const Type* Ty);
// ConstantFP accessors
@@ -188,6 +189,7 @@ public:
MDString* getMDString(const std::string &Str);
// FunctionType accessors
+ FunctionType* getFunctionType(const Type* Result, bool isVarArg);
FunctionType* getFunctionType(const Type* Result,
const std::vector<const Type*>& Params,
bool isVarArg);
diff --git a/include/llvm/Transforms/Utils/PromoteMemToReg.h b/include/llvm/Transforms/Utils/PromoteMemToReg.h
index 35cfadd..3d05800 100644
--- a/include/llvm/Transforms/Utils/PromoteMemToReg.h
+++ b/include/llvm/Transforms/Utils/PromoteMemToReg.h
@@ -23,6 +23,7 @@ class AllocaInst;
class DominatorTree;
class DominanceFrontier;
class AliasSetTracker;
+class LLVMContext;
/// isAllocaPromotable - Return true if this alloca is legal for promotion.
/// This is true if there are only loads and stores to the alloca...
@@ -39,6 +40,7 @@ bool isAllocaPromotable(const AllocaInst *AI);
///
void PromoteMemToReg(const std::vector<AllocaInst*> &Allocas,
DominatorTree &DT, DominanceFrontier &DF,
+ LLVMContext* Context,
AliasSetTracker *AST = 0);
} // End llvm namespace
diff --git a/include/llvm/Transforms/Utils/ValueMapper.h b/include/llvm/Transforms/Utils/ValueMapper.h
index ed33413..bddf393 100644
--- a/include/llvm/Transforms/Utils/ValueMapper.h
+++ b/include/llvm/Transforms/Utils/ValueMapper.h
@@ -20,9 +20,10 @@
namespace llvm {
class Value;
class Instruction;
+ class LLVMContext;
typedef DenseMap<const Value *, Value *> ValueMapTy;
- Value *MapValue(const Value *V, ValueMapTy &VM);
+ Value *MapValue(const Value *V, ValueMapTy &VM, LLVMContext* Context);
void RemapInstruction(Instruction *I, ValueMapTy &VM);
} // End llvm namespace