aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/IPO/LowerSetJmp.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
commiteed707b1e6097aac2bb6b3d47271f6300ace7f2e (patch)
treec7390f63d90fc0c0ac483a90275863f41b69c085 /lib/Transforms/IPO/LowerSetJmp.cpp
parente8530a3d8c940fb7710be7e25098b5c3b2c2de19 (diff)
Revert the ConstantInt constructors back to their 2.5 forms where possible, thanks to contexts-on-types. More to come.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77011 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/LowerSetJmp.cpp')
-rw-r--r--lib/Transforms/IPO/LowerSetJmp.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Transforms/IPO/LowerSetJmp.cpp b/lib/Transforms/IPO/LowerSetJmp.cpp
index e5ac22e8c7..980123af57 100644
--- a/lib/Transforms/IPO/LowerSetJmp.cpp
+++ b/lib/Transforms/IPO/LowerSetJmp.cpp
@@ -383,8 +383,7 @@ void LowerSetJmp::TransformSetJmpCall(CallInst* Inst)
new BitCastInst(Inst->getOperand(1), SBPTy, "SBJmpBuf", Inst);
std::vector<Value*> Args =
make_vector<Value*>(GetSetJmpMap(Func), BufPtr,
- Inst->getContext().getConstantInt(Type::Int32Ty,
- SetJmpIDMap[Func]++), 0);
+ ConstantInt::get(Type::Int32Ty,SetJmpIDMap[Func]++), 0);
CallInst::Create(AddSJToMap, Args.begin(), Args.end(), "", Inst);
// We are guaranteed that there are no values live across basic blocks
@@ -434,9 +433,8 @@ void LowerSetJmp::TransformSetJmpCall(CallInst* Inst)
// Add the case for this setjmp's number...
SwitchValuePair SVP = GetSJSwitch(Func, GetRethrowBB(Func));
- SVP.first->addCase(Inst->getContext().getConstantInt(Type::Int32Ty,
- SetJmpIDMap[Func] - 1),
- SetJmpContBlock);
+ SVP.first->addCase(ConstantInt::get(Type::Int32Ty, SetJmpIDMap[Func] - 1),
+ SetJmpContBlock);
// Value coming from the handling of the exception.
PHI->addIncoming(SVP.second, SVP.second->getParent());