From: Dan Gohman Date: Mon, 12 Dec 2011 18:19:12 +0000 (+0000) Subject: Use getArgOperand instead of getOperand on a call. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=8a9eebe6b904afaf86cb64b9e09380b4d9b592a0;p=oota-llvm.git Use getArgOperand instead of getOperand on a call. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146384 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/ObjCARC.cpp b/lib/Transforms/Scalar/ObjCARC.cpp index 2288f391cec..ea5f1be5847 100644 --- a/lib/Transforms/Scalar/ObjCARC.cpp +++ b/lib/Transforms/Scalar/ObjCARC.cpp @@ -3134,7 +3134,7 @@ void ObjCARCOpt::OptimizeWeakCalls(Function &F) { UE = Alloca->use_end(); UI != UE; ) { CallInst *UserInst = cast(*UI++); if (!UserInst->use_empty()) - UserInst->replaceAllUsesWith(UserInst->getOperand(1)); + UserInst->replaceAllUsesWith(UserInst->getArgOperand(0)); UserInst->eraseFromParent(); } Alloca->eraseFromParent();