[llvm-branch-commits] [llvm-branch] r100452 - /llvm/branches/ggreif/CallInst-operands/lib/Transforms/IPO/LowerSetJmp.cpp

Gabor Greif ggreif at gmail.com
Mon Apr 5 11:55:45 PDT 2010


Author: ggreif
Date: Mon Apr  5 13:55:45 2010
New Revision: 100452

URL: http://llvm.org/viewvc/llvm-project?rev=100452&view=rev
Log:
shift CallInst operands

Modified:
    llvm/branches/ggreif/CallInst-operands/lib/Transforms/IPO/LowerSetJmp.cpp

Modified: llvm/branches/ggreif/CallInst-operands/lib/Transforms/IPO/LowerSetJmp.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/CallInst-operands/lib/Transforms/IPO/LowerSetJmp.cpp?rev=100452&r1=100451&r2=100452&view=diff
==============================================================================
--- llvm/branches/ggreif/CallInst-operands/lib/Transforms/IPO/LowerSetJmp.cpp (original)
+++ llvm/branches/ggreif/CallInst-operands/lib/Transforms/IPO/LowerSetJmp.cpp Mon Apr  5 13:55:45 2010
@@ -262,8 +262,8 @@
   // 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(1), SBPTy, "LJBuf", Inst);
-  Value *Args[] = { CI, Inst->getOperand(2) };
+    new BitCastInst(Inst->getOperand(0), SBPTy, "LJBuf", Inst);
+  Value *Args[] = { CI, Inst->getOperand(1) };
   CallInst::Create(ThrowLongJmp, Args, Args + 2, "", Inst);
 
   SwitchValuePair& SVP = SwitchValMap[Inst->getParent()->getParent()];
@@ -378,7 +378,7 @@
   const Type* SBPTy =
           Type::getInt8PtrTy(Inst->getContext());
   CastInst* BufPtr = 
-    new BitCastInst(Inst->getOperand(1), SBPTy, "SBJmpBuf", Inst);
+    new BitCastInst(Inst->getOperand(0), SBPTy, "SBJmpBuf", Inst);
   Value *Args[] = {
     GetSetJmpMap(Func), BufPtr,
     ConstantInt::get(Type::getInt32Ty(Inst->getContext()), SetJmpIDMap[Func]++)





More information about the llvm-branch-commits mailing list