summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2011-12-12 18:19:12 +0000
committerDan Gohman <gohman@apple.com>2011-12-12 18:19:12 +0000
commit8a9eebe6b904afaf86cb64b9e09380b4d9b592a0 (patch)
tree820bcbc401fa326b3ecd2468d8ce14c8bd8a500b
parent28588ff7aa417eded80101ea8d7fe4c7dcd8a1c1 (diff)
downloadllvm-8a9eebe6b904afaf86cb64b9e09380b4d9b592a0.tar.gz
llvm-8a9eebe6b904afaf86cb64b9e09380b4d9b592a0.tar.bz2
llvm-8a9eebe6b904afaf86cb64b9e09380b4d9b592a0.tar.xz
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
-rw-r--r--lib/Transforms/Scalar/ObjCARC.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/ObjCARC.cpp b/lib/Transforms/Scalar/ObjCARC.cpp
index 2288f391ce..ea5f1be584 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<CallInst>(*UI++);
if (!UserInst->use_empty())
- UserInst->replaceAllUsesWith(UserInst->getOperand(1));
+ UserInst->replaceAllUsesWith(UserInst->getArgOperand(0));
UserInst->eraseFromParent();
}
Alloca->eraseFromParent();