aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2010-06-24 13:42:49 +0000
committerGabor Greif <ggreif@gmail.com>2010-06-24 13:42:49 +0000
commit3c35083ee7f37a9683a7e05e1bfb02220d862d38 (patch)
tree14d8b4fc28575ecbf477836f190c2b613e7fd188 /lib
parent6b63f9986df835ae404073c1469d96ce44919f40 (diff)
downloadexternal_llvm-3c35083ee7f37a9683a7e05e1bfb02220d862d38.zip
external_llvm-3c35083ee7f37a9683a7e05e1bfb02220d862d38.tar.gz
external_llvm-3c35083ee7f37a9683a7e05e1bfb02220d862d38.tar.bz2
use ArgOperand API
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106743 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/InstCombine/InstCombineCalls.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineCalls.cpp b/lib/Transforms/InstCombine/InstCombineCalls.cpp
index f3025dc..c9ab176 100644
--- a/lib/Transforms/InstCombine/InstCombineCalls.cpp
+++ b/lib/Transforms/InstCombine/InstCombineCalls.cpp
@@ -289,11 +289,10 @@ Instruction *InstCombiner::visitCallInst(CallInst &CI) {
if (GVSrc->isConstant()) {
Module *M = CI.getParent()->getParent()->getParent();
Intrinsic::ID MemCpyID = Intrinsic::memcpy;
- const Type *Tys[3] = { CI.getOperand(1)->getType(),
- CI.getOperand(2)->getType(),
- CI.getOperand(3)->getType() };
- CI.setCalledFunction(
- Intrinsic::getDeclaration(M, MemCpyID, Tys, 3));
+ const Type *Tys[3] = { CI.getArgOperand(0)->getType(),
+ CI.getArgOperand(1)->getType(),
+ CI.getArgOperand(2)->getType() };
+ CI.setCalledFunction(Intrinsic::getDeclaration(M, MemCpyID, Tys, 3));
Changed = true;
}
}
@@ -313,7 +312,7 @@ Instruction *InstCombiner::visitCallInst(CallInst &CI) {
if (Instruction *I = SimplifyMemSet(MSI))
return I;
}
-
+
if (Changed) return II;
}