summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/ExtractGV.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-06 01:34:54 +0000
committerOwen Anderson <resistor@mac.com>2009-07-06 01:34:54 +0000
commit605a8c743fd3ecdc107c7c1a3f6f3663d6790740 (patch)
tree8b5774e3a0727a71cb613e7a3a077e13f1fc0bd8 /llvm/lib/Transforms/IPO/ExtractGV.cpp
parent1561c6cf54fdc244006cc8dc3708bebdf8516890 (diff)
downloadbcm5719-llvm-605a8c743fd3ecdc107c7c1a3f6f3663d6790740.tar.gz
bcm5719-llvm-605a8c743fd3ecdc107c7c1a3f6f3663d6790740.zip
More LLVMContext-ification.
llvm-svn: 74811
Diffstat (limited to 'llvm/lib/Transforms/IPO/ExtractGV.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/ExtractGV.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/IPO/ExtractGV.cpp b/llvm/lib/Transforms/IPO/ExtractGV.cpp
index 0c529d239d9..8cd5deb6dfe 100644
--- a/llvm/lib/Transforms/IPO/ExtractGV.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud