summaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Instrumentation
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2010-04-16 23:37:20 +0000
committerEric Christopher <echristo@apple.com>2010-04-16 23:37:20 +0000
commit551754c4958086cc6910da7c950f2875e212f5cf (patch)
tree0287e856d7bde9ea8c3e629ffb889a78b778f634 /lib/Transforms/Instrumentation
parentf2548caaa8b290aa598bf49c27dff72f7751ba5c (diff)
downloadexternal_llvm-551754c4958086cc6910da7c950f2875e212f5cf.zip
external_llvm-551754c4958086cc6910da7c950f2875e212f5cf.tar.gz
external_llvm-551754c4958086cc6910da7c950f2875e212f5cf.tar.bz2
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101579 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation')
-rw-r--r--lib/Transforms/Instrumentation/ProfilingUtils.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Transforms/Instrumentation/ProfilingUtils.cpp b/lib/Transforms/Instrumentation/ProfilingUtils.cpp
index d534690..8662a82 100644
--- a/lib/Transforms/Instrumentation/ProfilingUtils.cpp
+++ b/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;