diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-06 01:34:54 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-06 01:34:54 +0000 |
commit | 14ce9ef2e9013ba56e1daafebd91fe3ee1e8647e (patch) | |
tree | 5e088b350f6c0872c6637e1abfd0b74d8d85b891 /lib/Transforms/IPO/ExtractGV.cpp | |
parent | e8c81ea3f8e00c55f55d7f0aa9a1ff6a97211786 (diff) |
More LLVMContext-ification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74811 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/ExtractGV.cpp')
-rw-r--r-- | lib/Transforms/IPO/ExtractGV.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Transforms/IPO/ExtractGV.cpp b/lib/Transforms/IPO/ExtractGV.cpp index 0c529d239d..8cd5deb6df 100644 --- a/lib/Transforms/IPO/ExtractGV.cpp +++ b/lib/Transforms/IPO/ExtractGV.cpp @@ -12,6 +12,7 @@ //===----------------------------------------------------------------------===// #include "llvm/Instructions.h" +#include "llvm/LLVMContext.h" #include "llvm/Module.h" #include "llvm/Pass.h" #include "llvm/Constants.h" @@ -99,14 +100,14 @@ namespace { // by putting them in the used array { std::vector<Constant *> AUGs; - const Type *SBP= PointerType::getUnqual(Type::Int8Ty); + const Type *SBP= Context->getPointerTypeUnqual(Type::Int8Ty); for (std::vector<GlobalValue*>::iterator GI = Named.begin(), GE = Named.end(); GI != GE; ++GI) { (*GI)->setLinkage(GlobalValue::ExternalLinkage); - AUGs.push_back(ConstantExpr::getBitCast(*GI, SBP)); + AUGs.push_back(Context->getConstantExprBitCast(*GI, SBP)); } - ArrayType *AT = ArrayType::get(SBP, AUGs.size()); - Constant *Init = ConstantArray::get(AT, AUGs); + ArrayType *AT = Context->getArrayType(SBP, AUGs.size()); + Constant *Init = Context->getConstantArray(AT, AUGs); GlobalValue *gv = new GlobalVariable(AT, false, GlobalValue::AppendingLinkage, Init, "llvm.used", &M); |