[llvm-commits] [llvm] r130536 - /llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp

Devang Patel dpatel at apple.com
Fri Apr 29 13:38:55 PDT 2011


Author: dpatel
Date: Fri Apr 29 15:38:55 2011
New Revision: 130536

URL: http://llvm.org/viewvc/llvm-project?rev=130536&view=rev
Log:
Preserve line number information.

Modified:
    llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp?rev=130536&r1=130535&r2=130536&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp Fri Apr 29 15:38:55 2011
@@ -326,7 +326,8 @@
     // 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.





More information about the llvm-commits mailing list