[llvm-commits] [llvm] r107004 - /llvm/trunk/lib/Transforms/Instrumentation/ProfilingUtils.cpp
Gabor Greif
ggreif at gmail.com
Mon Jun 28 05:31:35 PDT 2010
Author: ggreif
Date: Mon Jun 28 07:31:35 2010
New Revision: 107004
URL: http://llvm.org/viewvc/llvm-project?rev=107004&view=rev
Log:
use setArgOperand
Modified:
llvm/trunk/lib/Transforms/Instrumentation/ProfilingUtils.cpp
Modified: llvm/trunk/lib/Transforms/Instrumentation/ProfilingUtils.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/ProfilingUtils.cpp?rev=107004&r1=107003&r2=107004&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/ProfilingUtils.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/ProfilingUtils.cpp Mon Jun 28 07:31:35 2010
@@ -61,8 +61,8 @@
}
Args[3] = ConstantInt::get(Type::getInt32Ty(Context), NumElements);
- Instruction *InitCall = CallInst::Create(InitFn, Args.begin(), Args.end(),
- "newargc", InsertPos);
+ CallInst *InitCall = CallInst::Create(InitFn, Args.begin(), Args.end(),
+ "newargc", InsertPos);
// If argc or argv are not available in main, just pass null values in.
Function::arg_iterator AI;
@@ -73,10 +73,10 @@
if (AI->getType() != ArgVTy) {
Instruction::CastOps opcode = CastInst::getCastOpcode(AI, false, ArgVTy,
false);
- InitCall->setOperand(2,
+ InitCall->setArgOperand(1,
CastInst::Create(opcode, AI, ArgVTy, "argv.cast", InitCall));
} else {
- InitCall->setOperand(2, AI);
+ InitCall->setArgOperand(1, AI);
}
/* FALL THROUGH */
@@ -93,12 +93,12 @@
}
opcode = CastInst::getCastOpcode(AI, true,
Type::getInt32Ty(Context), true);
- InitCall->setOperand(1,
+ InitCall->setArgOperand(0,
CastInst::Create(opcode, AI, Type::getInt32Ty(Context),
"argc.cast", InitCall));
} else {
AI->replaceAllUsesWith(InitCall);
- InitCall->setOperand(1, AI);
+ InitCall->setArgOperand(0, AI);
}
case 0: break;
More information about the llvm-commits
mailing list