use ArgOperand APIs
authorGabor Greif <ggreif@gmail.com>
Tue, 29 Jun 2010 13:03:46 +0000 (13:03 +0000)
committerGabor Greif <ggreif@gmail.com>
Tue, 29 Jun 2010 13:03:46 +0000 (13:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107132 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/DwarfEHPrepare.cpp

index 3fb4019cccdd1ba68b6bfb24a2d3a0dcd1c9118c..3cb5265bc420b0e3e3b13bf93ff34e760b95244f 100644 (file)
@@ -246,10 +246,10 @@ bool DwarfEHPrepare::CleanupSelectors() {
     if (!Sel || Sel->getParent()->getParent() != F) continue;
 
     // Index of the ".llvm.eh.catch.all.value" variable.
-    unsigned OpIdx = Sel->getNumOperands() - 1;
-    GlobalVariable *GV = dyn_cast<GlobalVariable>(Sel->getOperand(OpIdx));
+    unsigned OpIdx = Sel->getNumArgOperands() - 1;
+    GlobalVariable *GV = dyn_cast<GlobalVariable>(Sel->getArgOperand(OpIdx));
     if (GV != EHCatchAllValue) continue;
-    Sel->setOperand(OpIdx, EHCatchAllValue->getInitializer());
+    Sel->setArgOperand(OpIdx, EHCatchAllValue->getInitializer());
     Changed = true;
   }