remove use of BasicBlock::getNext

llvm-svn: 36205
diff --git a/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp b/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp
index 2cf2ecd..7761e93 100644
--- a/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp
+++ b/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp
@@ -129,7 +129,8 @@
 
   // Insert the block into the function... right after the block TI lives in.
   Function &F = *TIBB->getParent();
-  F.getBasicBlockList().insert(TIBB->getNext(), NewBB);
+  Function::iterator FBBI = TIBB;
+  F.getBasicBlockList().insert(++FBBI, NewBB);
   
   // If there are any PHI nodes in DestBB, we need to update them so that they
   // merge incoming values from NewBB instead of from TIBB.