remove use of BasicBlock::getNext
authorChris Lattner <sabre@nondot.org>
Tue, 17 Apr 2007 17:54:12 +0000 (17:54 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 17 Apr 2007 17:54:12 +0000 (17:54 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36202 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Instrumentation/RSProfiling.cpp

index 680347ebebbf544039e59955ea313be32ee698bb..f97b2bcd3e78f3d86b149d3b9695ca97f8f2abde 100644 (file)
@@ -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: