From: Devang Patel Date: Fri, 29 Apr 2011 20:38:55 +0000 (+0000) Subject: Preserve line number information. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=bd5426a4f263eca7893fc54775d6cd86e729e100;p=oota-llvm.git Preserve line number information. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130536 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/LoopRotation.cpp b/lib/Transforms/Scalar/LoopRotation.cpp index e7b1a031f84..47dced37c3a 100644 --- a/lib/Transforms/Scalar/LoopRotation.cpp +++ b/lib/Transforms/Scalar/LoopRotation.cpp @@ -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.