summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2010-04-15 12:46:56 +0000
committerGabor Greif <ggreif@gmail.com>2010-04-15 12:46:56 +0000
commit9fd00c7d255cd5e15de146550a19c5f8a0a7dc33 (patch)
treebf222f4c04dd1c5266098dd8c20d0c8059dd80ae /llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp
parent3d9d23561934f4ea682cc9113d986ece267aa34d (diff)
downloadbcm5719-llvm-9fd00c7d255cd5e15de146550a19c5f8a0a7dc33.tar.gz
bcm5719-llvm-9fd00c7d255cd5e15de146550a19c5f8a0a7dc33.zip
back out r101364, as it trips the linux nightlybot on some clang C++ tests
llvm-svn: 101368
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp')
-rw-r--r--llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp8
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;
OpenPOWER on IntegriCloud