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

lib/CodeGen/SjLjEHPrepare.cpp

index 9aa2b69f65cd58531c089519e2e84ec40b8691db..f76eaf127823c45ed6a26ea422b617cc9230017c 100644 (file)
@@ -339,7 +339,7 @@ bool SjLjEHPass::insertSjLjEHSupport(Function &F) {
     for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I) {
       if (CallInst *CI = dyn_cast<CallInst>(I)) {
         if (CI->getCalledFunction() == SelectorFn) {
-          if (!PersonalityFn) PersonalityFn = CI->getOperand(2);
+          if (!PersonalityFn) PersonalityFn = CI->getArgOperand(1);
           EH_Selectors.push_back(CI);
         } else if (CI->getCalledFunction() == ExceptionFn) {
           EH_Exceptions.push_back(CI);