Preserve line number information.

llvm-svn: 131480
This commit is contained in:
Devang Patel 2011-05-17 19:43:06 +00:00
parent fe7e3eeddc
commit c23bcbc498
1 changed files with 2 additions and 1 deletions

View File

@ -180,7 +180,8 @@ BasicBlock *llvm::SplitCriticalEdge(TerminatorInst *TI, unsigned SuccNum,
BasicBlock *NewBB = BasicBlock::Create(TI->getContext(),
TIBB->getName() + "." + DestBB->getName() + "_crit_edge");
// Create our unconditional branch.
BranchInst::Create(DestBB, NewBB);
BranchInst *NewBI = BranchInst::Create(DestBB, NewBB);
NewBI->setDebugLoc(TI->getDebugLoc());
// Branch to the new block, breaking the edge.
TI->setSuccessor(SuccNum, NewBB);