Preserve line number information.

llvm-svn: 130536
This commit is contained in:
Devang Patel 2011-04-29 20:38:55 +00:00
parent 2b2e06d1a3
commit c1f7c1d469
1 changed files with 2 additions and 1 deletions

View File

@ -326,7 +326,8 @@ bool LoopRotate::rotateLoop(Loop *L) {
// We can fold the conditional branch in the preheader, this makes things
// simpler. The first step is to remove the extra edge to the Exit block.
Exit->removePredecessor(OrigPreheader, true /*preserve LCSSA*/);
BranchInst::Create(NewHeader, PHBI);
BranchInst *NewBI = BranchInst::Create(NewHeader, PHBI);
NewBI->setDebugLoc(PHBI->getDebugLoc());
PHBI->eraseFromParent();
// With our CFG finalized, update DomTree if it is available.