Start using the nicer terminator auto-insertion API

llvm-svn: 10111
diff --git a/llvm/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp b/llvm/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp
index 9d6107c..8331781 100644
--- a/llvm/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp
+++ b/llvm/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp
@@ -145,10 +145,8 @@
     ti->setSuccessor(index, newBB);
         
     BasicBlock::InstListType &lt = newBB->getInstList();
-
-    Instruction *call = new CallInst(inCountMth);
-    lt.push_back(call);
-    lt.push_back(new BranchInst(BB));
+    lt.push_back(new CallInst(inCountMth));
+    new BranchInst(BB, newBB);
       
     //now iterate over *vl, and set its Phi nodes right
     for(BasicBlock::iterator BB2Inst = BB->begin(), BBend = BB->end();