diff options
| author | Gabor Greif <ggreif@gmail.com> | 2010-06-28 12:31:35 +0000 |
|---|---|---|
| committer | Gabor Greif <ggreif@gmail.com> | 2010-06-28 12:31:35 +0000 |
| commit | 2dd4307e45f33648333c5059ddf8e466529a0e86 (patch) | |
| tree | 5143c73154d3723360839cea6d24755111eae377 /llvm/lib/Transforms/Instrumentation | |
| parent | ec60adf1619d62045120682c984d06a8fd951373 (diff) | |
| download | bcm5719-llvm-2dd4307e45f33648333c5059ddf8e466529a0e86.tar.gz bcm5719-llvm-2dd4307e45f33648333c5059ddf8e466529a0e86.zip | |
use setArgOperand
llvm-svn: 107004
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation')
| -rw-r--r-- | llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp b/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp index 8662a82e8e5..1a30e9ba288 100644 --- a/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp +++ b/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp @@ -61,8 +61,8 @@ void llvm::InsertProfilingInitCall(Function *MainFn, const char *FnName, } 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 @@ void llvm::InsertProfilingInitCall(Function *MainFn, const char *FnName, 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 @@ void llvm::InsertProfilingInitCall(Function *MainFn, const char *FnName, } 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; |

