Use getArgOperand instead of getOperand on a call.

llvm-svn: 146384
This commit is contained in:
Dan Gohman 2011-12-12 18:19:12 +00:00
parent 843044b75b
commit 09b272bb2b
1 changed files with 1 additions and 1 deletions

View File

@ -3134,7 +3134,7 @@ void ObjCARCOpt::OptimizeWeakCalls(Function &F) {
UE = Alloca->use_end(); UI != UE; ) {
CallInst *UserInst = cast<CallInst>(*UI++);
if (!UserInst->use_empty())
UserInst->replaceAllUsesWith(UserInst->getOperand(1));
UserInst->replaceAllUsesWith(UserInst->getArgOperand(0));
UserInst->eraseFromParent();
}
Alloca->eraseFromParent();