API changes for class Use size reduction, wave 1.
[oota-llvm.git] / lib / Transforms / Utils / BreakCriticalEdges.cpp
index 78801db4cd43eb33cf124fdc2173b52870bc7cd4..1a41d95a03251f8aca3a7d3dddc7e3854cfec9d8 100644 (file)
@@ -122,10 +122,10 @@ bool llvm::SplitCriticalEdge(TerminatorInst *TI, unsigned SuccNum, Pass *P,
   BasicBlock *DestBB = TI->getSuccessor(SuccNum);
 
   // Create a new basic block, linking it into the CFG.
-  BasicBlock *NewBB = new BasicBlock(TIBB->getName() + "." +
-                                     DestBB->getName() + "_crit_edge");
+  BasicBlock *NewBB = BasicBlock::Create(TIBB->getName() + "." +
+                                         DestBB->getName() + "_crit_edge");
   // Create our unconditional branch...
-  new BranchInst(DestBB, NewBB);
+  BranchInst::Create(DestBB, NewBB);
 
   // Branch to the new block, breaking the edge.
   TI->setSuccessor(SuccNum, NewBB);