Start using the nicer terminator auto-insertion API

llvm-svn: 10111
diff --git a/llvm/lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp b/llvm/lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp
index 3cb5698..51bc425 100644
--- a/llvm/lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp
+++ b/llvm/lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp
@@ -344,12 +344,10 @@
     newBB->getInstList().push_back(newBI2);
     
     //triggerBB->getInstList().push_back(triggerInst);
-    Instruction *triggerBranch = new BranchInst(BB2);
-    triggerBB->getInstList().push_back(triggerBranch);
+    new BranchInst(BB2, 0, 0, triggerBB);
   }
   else{
-    Instruction *newBI2=new BranchInst(BB2);
-    newBB->getInstList().push_back(newBI2);
+    new BranchInst(BB2, 0, 0, newBB);
   }
 
   //now iterate over BB2, and set its Phi nodes right