diff options
| author | Eric Christopher <echristo@apple.com> | 2010-04-16 23:37:20 +0000 |
|---|---|---|
| committer | Eric Christopher <echristo@apple.com> | 2010-04-16 23:37:20 +0000 |
| commit | 7258dcd77f19bf5adb5f76d4c2bb5fc426ba75c2 (patch) | |
| tree | c2f3cc1957d7ba72772b73e9f98ca4d55ab5cfdf /llvm/lib/Transforms/IPO/LowerSetJmp.cpp | |
| parent | 4ebae65d6af71115de86273e6b27f67e2cde2be7 (diff) | |
| download | bcm5719-llvm-7258dcd77f19bf5adb5f76d4c2bb5fc426ba75c2.tar.gz bcm5719-llvm-7258dcd77f19bf5adb5f76d4c2bb5fc426ba75c2.zip | |
Revert 101465, it broke internal OpenGL testing.
Probably the best way to know that all getOperand() calls have been handled
is to replace that API instead of updating.
llvm-svn: 101579
Diffstat (limited to 'llvm/lib/Transforms/IPO/LowerSetJmp.cpp')
| -rw-r--r-- | llvm/lib/Transforms/IPO/LowerSetJmp.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/IPO/LowerSetJmp.cpp b/llvm/lib/Transforms/IPO/LowerSetJmp.cpp index d1eaadd8a72..4d61e8345e0 100644 --- a/llvm/lib/Transforms/IPO/LowerSetJmp.cpp +++ b/llvm/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); |

