summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Instrumentation
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation')
-rw-r--r--llvm/lib/Transforms/Instrumentation/RSProfiling.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/RSProfiling.cpp b/llvm/lib/Transforms/Instrumentation/RSProfiling.cpp
index 680347ebebb..f97b2bcd3e7 100644
--- a/llvm/lib/Transforms/Instrumentation/RSProfiling.cpp
+++ b/llvm/lib/Transforms/Instrumentation/RSProfiling.cpp
@@ -455,10 +455,11 @@ void ProfilerRS::ProcessBackEdge(BasicBlock* src, BasicBlock* dst, Function& F)
// add in edge from C using x in A'
//a:
- BasicBlock* bbC = new BasicBlock("choice", &F, src->getNext() );
+ Function::iterator BBN = src; ++BBN;
+ BasicBlock* bbC = new BasicBlock("choice", &F, BBN);
//ChoicePoints.insert(bbC);
- BasicBlock* bbCp =
- new BasicBlock("choice", &F, cast<BasicBlock>(Translate(src))->getNext() );
+ BBN = cast<BasicBlock>(Translate(src));
+ BasicBlock* bbCp = new BasicBlock("choice", &F, ++BBN);
ChoicePoints.insert(bbCp);
//b:
OpenPOWER on IntegriCloud