summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/LowerInvoke.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-24 23:12:02 +0000
committerOwen Anderson <resistor@mac.com>2009-07-24 23:12:02 +0000
commitedb4a703255623eef2c56e644f9fdc04cadd7336 (patch)
tree0ef285683687c1c927ff68af16d77b3645e0d66d /llvm/lib/Transforms/Utils/LowerInvoke.cpp
parentfcd54f73bf465f9fa7a820344642f848b5285a3b (diff)
downloadbcm5719-llvm-edb4a703255623eef2c56e644f9fdc04cadd7336.tar.gz
bcm5719-llvm-edb4a703255623eef2c56e644f9fdc04cadd7336.zip
Revert the ConstantInt constructors back to their 2.5 forms where possible, thanks to contexts-on-types. More to come.
llvm-svn: 77011
Diffstat (limited to 'llvm/lib/Transforms/Utils/LowerInvoke.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/LowerInvoke.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/Utils/LowerInvoke.cpp b/llvm/lib/Transforms/Utils/LowerInvoke.cpp
index 9f20f3954d2..6a56bbe973d 100644
--- a/llvm/lib/Transforms/Utils/LowerInvoke.cpp
+++ b/llvm/lib/Transforms/Utils/LowerInvoke.cpp
@@ -272,7 +272,7 @@ void LowerInvoke::rewriteExpensiveInvoke(InvokeInst *II, unsigned InvokeNo,
AllocaInst *InvokeNum,
SwitchInst *CatchSwitch) {
LLVMContext &Context = II->getContext();
- ConstantInt *InvokeNoC = Context.getConstantInt(Type::Int32Ty, InvokeNo);
+ ConstantInt *InvokeNoC = ConstantInt::get(Type::Int32Ty, InvokeNo);
// If the unwind edge has phi nodes, split the edge.
if (isa<PHINode>(II->getUnwindDest()->begin())) {
@@ -483,7 +483,7 @@ bool LowerInvoke::insertExpensiveEHSupport(Function &F) {
std::vector<Value*> Idx;
Idx.push_back(Context.getNullValue(Type::Int32Ty));
- Idx.push_back(Context.getConstantInt(Type::Int32Ty, 1));
+ Idx.push_back(ConstantInt::get(Type::Int32Ty, 1));
OldJmpBufPtr = GetElementPtrInst::Create(JmpBuf, Idx.begin(), Idx.end(),
"OldBuf",
EntryBB->getTerminator());
@@ -504,7 +504,7 @@ bool LowerInvoke::insertExpensiveEHSupport(Function &F) {
// executing. For normal calls it contains zero.
AllocaInst *InvokeNum = new AllocaInst(Type::Int32Ty, 0,
"invokenum",EntryBB->begin());
- new StoreInst(Context.getConstantInt(Type::Int32Ty, 0), InvokeNum, true,
+ new StoreInst(ConstantInt::get(Type::Int32Ty, 0), InvokeNum, true,
EntryBB->getTerminator());
// Insert a load in the Catch block, and a switch on its value. By default,
@@ -523,7 +523,7 @@ bool LowerInvoke::insertExpensiveEHSupport(Function &F) {
BasicBlock *ContBlock = EntryBB->splitBasicBlock(EntryBB->getTerminator(),
"setjmp.cont");
- Idx[1] = Context.getConstantInt(Type::Int32Ty, 0);
+ Idx[1] = ConstantInt::get(Type::Int32Ty, 0);
Value *JmpBufPtr = GetElementPtrInst::Create(JmpBuf, Idx.begin(), Idx.end(),
"TheJmpBuf",
EntryBB->getTerminator());
@@ -577,12 +577,12 @@ bool LowerInvoke::insertExpensiveEHSupport(Function &F) {
// Get a pointer to the jmpbuf and longjmp.
std::vector<Value*> Idx;
Idx.push_back(Context.getNullValue(Type::Int32Ty));
- Idx.push_back(Context.getConstantInt(Type::Int32Ty, 0));
+ Idx.push_back(ConstantInt::get(Type::Int32Ty, 0));
Idx[0] = GetElementPtrInst::Create(BufPtr, Idx.begin(), Idx.end(), "JmpBuf",
UnwindBlock);
Idx[0] = new BitCastInst(Idx[0], PointerType::getUnqual(Type::Int8Ty),
"tmp", UnwindBlock);
- Idx[1] = Context.getConstantInt(Type::Int32Ty, 1);
+ Idx[1] = ConstantInt::get(Type::Int32Ty, 1);
CallInst::Create(LongJmpFn, Idx.begin(), Idx.end(), "", UnwindBlock);
new UnreachableInst(UnwindBlock);
OpenPOWER on IntegriCloud