diff options
author | Bill Wendling <isanbard@gmail.com> | 2011-08-25 01:08:34 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2011-08-25 01:08:34 +0000 |
commit | 89d4411cef736898047aa7e3bc159da39cacf8e6 (patch) | |
tree | 0cff549e497ac6e7ed3beed48680279ccccb29b7 /lib/Transforms/Instrumentation/ProfilingUtils.cpp | |
parent | b8cfe4ff411d92b150ce7ec6ec3568ad187dd517 (diff) |
When inserting new instructions, use getFirstInsertionPt instead of
getFirstNonPHI so that it will skip over the landingpad instructions as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138537 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation/ProfilingUtils.cpp')
-rw-r--r-- | lib/Transforms/Instrumentation/ProfilingUtils.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Instrumentation/ProfilingUtils.cpp b/lib/Transforms/Instrumentation/ProfilingUtils.cpp index 0263c75c75..de57cd1734 100644 --- a/lib/Transforms/Instrumentation/ProfilingUtils.cpp +++ b/lib/Transforms/Instrumentation/ProfilingUtils.cpp @@ -107,7 +107,7 @@ void llvm::InsertProfilingInitCall(Function *MainFn, const char *FnName, void llvm::IncrementCounterInBlock(BasicBlock *BB, unsigned CounterNum, GlobalValue *CounterArray, bool beginning) { // Insert the increment after any alloca or PHI instructions... - BasicBlock::iterator InsertPos = beginning ? BB->getFirstNonPHI() : + BasicBlock::iterator InsertPos = beginning ? BB->getFirstInsertionPt() : BB->getTerminator(); while (isa<AllocaInst>(InsertPos)) ++InsertPos; |