use ArgOperand API
authorGabor Greif <ggreif@gmail.com>
Fri, 25 Jun 2010 08:24:59 +0000 (08:24 +0000)
committerGabor Greif <ggreif@gmail.com>
Fri, 25 Jun 2010 08:24:59 +0000 (08:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106828 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp

index e711b9b84e8933ba90aefb4eea268229b09958de..134732e8585afc711250db7754641e1cdbbd6129 100644 (file)
@@ -206,7 +206,7 @@ unsigned FunctionLoweringInfo::CreateRegForValue(const Value *V) {
 void llvm::AddCatchInfo(const CallInst &I, MachineModuleInfo *MMI,
                         MachineBasicBlock *MBB) {
   // Inform the MachineModuleInfo of the personality for this landing pad.
-  const ConstantExpr *CE = cast<ConstantExpr>(I.getOperand(2));
+  const ConstantExpr *CE = cast<ConstantExpr>(I.getArgOperand(1));
   assert(CE->getOpcode() == Instruction::BitCast &&
          isa<Function>(CE->getOperand(0)) &&
          "Personality should be a function");