Start using the nicer terminator auto-insertion API

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10111 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2003-11-20 18:25:24 +00:00
parent adbc0b5287
commit f8485c6434
12 changed files with 32 additions and 46 deletions

View File

@ -106,8 +106,7 @@ bool SplitCriticalEdge(TerminatorInst *TI, unsigned SuccNum, Pass *P) {
BasicBlock *NewBB = new BasicBlock(TIBB->getName() + "." +
DestBB->getName() + "_crit_edge");
// Create our unconditional branch...
BranchInst *BI = new BranchInst(DestBB);
NewBB->getInstList().push_back(BI);
new BranchInst(DestBB, 0, 0, NewBB);
// Branch to the new block, breaking the edge...
TI->setSuccessor(SuccNum, NewBB);