summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-28 18:32:17 +0000
committerOwen Anderson <resistor@mac.com>2009-07-28 18:32:17 +0000
commitc2c7932c640032063fddab43a13e2c15aa29fda3 (patch)
treec8345816a0dfb9ce8a8f71cb4aec18b7cd3bbeb3 /llvm/lib/Transforms
parent2706a550711dd4c85924b78cc1787267e62aec56 (diff)
downloadbcm5719-llvm-c2c7932c640032063fddab43a13e2c15aa29fda3.tar.gz
bcm5719-llvm-c2c7932c640032063fddab43a13e2c15aa29fda3.zip
Change ConstantArray to 2.5 API.
llvm-svn: 77347
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/IPO/ExtractGV.cpp2
-rw-r--r--llvm/lib/Transforms/IPO/GlobalOpt.cpp4
-rw-r--r--llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp2
-rw-r--r--llvm/lib/Transforms/Utils/LowerInvoke.cpp4
-rw-r--r--llvm/lib/Transforms/Utils/ValueMapper.cpp2
5 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/IPO/ExtractGV.cpp b/llvm/lib/Transforms/IPO/ExtractGV.cpp
index 57cd1ca1d63..2767f431943 100644
--- a/llvm/lib/Transforms/IPO/ExtractGV.cpp
+++ b/llvm/lib/Transforms/IPO/ExtractGV.cpp
@@ -110,7 +110,7 @@ namespace {
AUGs.push_back(Context.getConstantExprBitCast(*GI, SBP));
}
ArrayType *AT = Context.getArrayType(SBP, AUGs.size());
- Constant *Init = Context.getConstantArray(AT, AUGs);
+ Constant *Init = ConstantArray::get(AT, AUGs);
GlobalValue *gv = new GlobalVariable(M, AT, false,
GlobalValue::AppendingLinkage,
Init, "llvm.used");
diff --git a/llvm/lib/Transforms/IPO/GlobalOpt.cpp b/llvm/lib/Transforms/IPO/GlobalOpt.cpp
index 2989e2827fc..bf01812bd7c 100644
--- a/llvm/lib/Transforms/IPO/GlobalOpt.cpp
+++ b/llvm/lib/Transforms/IPO/GlobalOpt.cpp
@@ -1968,7 +1968,7 @@ static GlobalVariable *InstallGlobalCtors(GlobalVariable *GCL,
// Create the array initializer.
const Type *StructTy =
cast<ArrayType>(GCL->getType()->getElementType())->getElementType();
- Constant *CA = Context.getConstantArray(ArrayType::get(StructTy,
+ Constant *CA = ConstantArray::get(ArrayType::get(StructTy,
CAList.size()), CAList);
// If we didn't change the number of elements, don't create a new GV.
@@ -2094,7 +2094,7 @@ static Constant *EvaluateStoreInto(Constant *Init, Constant *Val,
assert(CI->getZExtValue() < ATy->getNumElements());
Elts[CI->getZExtValue()] =
EvaluateStoreInto(Elts[CI->getZExtValue()], Val, Addr, OpNo+1, Context);
- return Context.getConstantArray(ATy, Elts);
+ return ConstantArray::get(ATy, Elts);
}
}
diff --git a/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp b/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp
index 0bf583a52ab..506ba1fdb6d 100644
--- a/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp
+++ b/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp
@@ -1290,7 +1290,7 @@ struct VISIBILITY_HIDDEN PrintFOpt : public LibCallOptimization {
// Create a string literal with no \n on it. We expect the constant merge
// pass to be run after this pass, to merge duplicate strings.
FormatStr.erase(FormatStr.end()-1);
- Constant *C = Context->getConstantArray(FormatStr, true);
+ Constant *C = ConstantArray::get(FormatStr, true);
C = new GlobalVariable(*Callee->getParent(), C->getType(), true,
GlobalVariable::InternalLinkage, C, "str");
EmitPutS(C, B);
diff --git a/llvm/lib/Transforms/Utils/LowerInvoke.cpp b/llvm/lib/Transforms/Utils/LowerInvoke.cpp
index 6a56bbe973d..b75b2ef4f5a 100644
--- a/llvm/lib/Transforms/Utils/LowerInvoke.cpp
+++ b/llvm/lib/Transforms/Utils/LowerInvoke.cpp
@@ -183,7 +183,7 @@ void LowerInvoke::createAbortMessage(Module *M) {
// The abort message for expensive EH support tells the user that the
// program 'unwound' without an 'invoke' instruction.
Constant *Msg =
- Context.getConstantArray("ERROR: Exception thrown, but not caught!\n");
+ ConstantArray::get("ERROR: Exception thrown, but not caught!\n");
AbortMessageLength = Msg->getNumOperands()-1; // don't include \0
GlobalVariable *MsgGV = new GlobalVariable(*M, Msg->getType(), true,
@@ -195,7 +195,7 @@ void LowerInvoke::createAbortMessage(Module *M) {
// The abort message for cheap EH support tells the user that EH is not
// enabled.
Constant *Msg =
- Context.getConstantArray("Exception handler needed, but not enabled."
+ ConstantArray::get("Exception handler needed, but not enabled."
"Recompile program with -enable-correct-eh-support.\n");
AbortMessageLength = Msg->getNumOperands()-1; // don't include \0
diff --git a/llvm/lib/Transforms/Utils/ValueMapper.cpp b/llvm/lib/Transforms/Utils/ValueMapper.cpp
index 643805a2f91..673bb0b58e0 100644
--- a/llvm/lib/Transforms/Utils/ValueMapper.cpp
+++ b/llvm/lib/Transforms/Utils/ValueMapper.cpp
@@ -56,7 +56,7 @@ Value *llvm::MapValue(const Value *V, ValueMapTy &VM, LLVMContext &Context) {
Values.push_back(cast<Constant>(MV));
for (++i; i != e; ++i)
Values.push_back(cast<Constant>(MapValue(*i, VM, Context)));
- return VM[V] = Context.getConstantArray(CA->getType(), Values);
+ return VM[V] = ConstantArray::get(CA->getType(), Values);
}
}
return VM[V] = C;
OpenPOWER on IntegriCloud