diff options
author | Gabor Greif <ggreif@gmail.com> | 2010-04-15 12:46:56 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2010-04-15 12:46:56 +0000 |
commit | 9ee17208115482441953127615231c59a2f4d052 (patch) | |
tree | fea1c2465e14ae8c3d89e0cf07588155acf8a23d /lib/Transforms/IPO/LowerSetJmp.cpp | |
parent | 45d95a1ad5eb72c65db8cc691a10339aa7c9c024 (diff) | |
download | external_llvm-9ee17208115482441953127615231c59a2f4d052.zip external_llvm-9ee17208115482441953127615231c59a2f4d052.tar.gz external_llvm-9ee17208115482441953127615231c59a2f4d052.tar.bz2 |
back out r101364, as it trips the linux nightlybot on some clang C++ tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101368 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/LowerSetJmp.cpp')
-rw-r--r-- | lib/Transforms/IPO/LowerSetJmp.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Transforms/IPO/LowerSetJmp.cpp b/lib/Transforms/IPO/LowerSetJmp.cpp index d1eaadd..4d61e83 100644 --- a/lib/Transforms/IPO/LowerSetJmp.cpp +++ b/lib/Transforms/IPO/LowerSetJmp.cpp @@ -262,8 +262,8 @@ void LowerSetJmp::TransformLongJmpCall(CallInst* Inst) // char*. It returns "void", so it doesn't need to replace any of // Inst's uses and doesn't get a name. CastInst* CI = - new BitCastInst(Inst->getOperand(0), SBPTy, "LJBuf", Inst); - Value *Args[] = { CI, Inst->getOperand(1) }; + new BitCastInst(Inst->getOperand(1), SBPTy, "LJBuf", Inst); + Value *Args[] = { CI, Inst->getOperand(2) }; CallInst::Create(ThrowLongJmp, Args, Args + 2, "", Inst); SwitchValuePair& SVP = SwitchValMap[Inst->getParent()->getParent()]; @@ -378,7 +378,7 @@ void LowerSetJmp::TransformSetJmpCall(CallInst* Inst) const Type* SBPTy = Type::getInt8PtrTy(Inst->getContext()); CastInst* BufPtr = - new BitCastInst(Inst->getOperand(0), SBPTy, "SBJmpBuf", Inst); + new BitCastInst(Inst->getOperand(1), SBPTy, "SBJmpBuf", Inst); Value *Args[] = { GetSetJmpMap(Func), BufPtr, ConstantInt::get(Type::getInt32Ty(Inst->getContext()), SetJmpIDMap[Func]++) @@ -473,7 +473,7 @@ void LowerSetJmp::visitCallInst(CallInst& CI) // Construct the new "invoke" instruction. TerminatorInst* Term = OldBB->getTerminator(); - std::vector<Value*> Params(CI.op_begin(), CI.op_end() - 1); + std::vector<Value*> Params(CI.op_begin() + 1, CI.op_end()); InvokeInst* II = InvokeInst::Create(CI.getCalledValue(), NewBB, PrelimBBMap[Func], Params.begin(), Params.end(), CI.getName(), Term); |