use ArgOperand API (one more hunk I could split)
authorGabor Greif <ggreif@gmail.com>
Fri, 25 Jun 2010 07:58:41 +0000 (07:58 +0000)
committerGabor Greif <ggreif@gmail.com>
Fri, 25 Jun 2010 07:58:41 +0000 (07:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106825 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Utils/BuildLibCalls.cpp

index 309a7bc53e529761f9ef4334f1267b90fbddc340..a1c4d5af7611ea066b6766aa0e7b57aef6bcbb07 100644 (file)
@@ -465,8 +465,8 @@ bool SimplifyFortifiedLibCalls::fold(CallInst *CI, const TargetData *TD) {
     if (isFoldable(4, 3, false)) {
       Value *Val = B.CreateIntCast(CI->getOperand(2), B.getInt8Ty(),
                                    false);
-      EmitMemSet(CI->getOperand(1), Val,  CI->getOperand(3), false, B, TD);
-      replaceCall(CI->getOperand(1));
+      EmitMemSet(CI->getArgOperand(0), Val,  CI->getArgOperand(2), false, B, TD);
+      replaceCall(CI->getArgOperand(0));
       return true;
     }
     return false;