use ArgOperand APIs

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107132 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Gabor Greif 2010-06-29 13:03:46 +00:00
parent 978189e090
commit 9d677680e4

View 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;
}