diff options
author | Eric Christopher <echristo@apple.com> | 2010-04-16 23:37:20 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2010-04-16 23:37:20 +0000 |
commit | 7258dcd77f19bf5adb5f76d4c2bb5fc426ba75c2 (patch) | |
tree | c2f3cc1957d7ba72772b73e9f98ca4d55ab5cfdf /llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp | |
parent | 4ebae65d6af71115de86273e6b27f67e2cde2be7 (diff) | |
download | bcm5719-llvm-7258dcd77f19bf5adb5f76d4c2bb5fc426ba75c2.tar.gz bcm5719-llvm-7258dcd77f19bf5adb5f76d4c2bb5fc426ba75c2.zip |
Revert 101465, it broke internal OpenGL testing.
Probably the best way to know that all getOperand() calls have been handled
is to replace that API instead of updating.
llvm-svn: 101579
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp b/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp index d5346904ae1..8662a82e8e5 100644 --- a/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp +++ b/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp @@ -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(1, + InitCall->setOperand(2, CastInst::Create(opcode, AI, ArgVTy, "argv.cast", InitCall)); } else { - InitCall->setOperand(1, AI); + InitCall->setOperand(2, 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(0, + InitCall->setOperand(1, CastInst::Create(opcode, AI, Type::getInt32Ty(Context), "argc.cast", InitCall)); } else { AI->replaceAllUsesWith(InitCall); - InitCall->setOperand(0, AI); + InitCall->setOperand(1, AI); } case 0: break; |