aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Scalar/LoopRotation.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-04-29 20:38:55 +0000
committerDevang Patel <dpatel@apple.com>2011-04-29 20:38:55 +0000
commitbd5426a4f263eca7893fc54775d6cd86e729e100 (patch)
tree914b1e1aaa348f66e1424e850c0fa4a53d65ce30 /lib/Transforms/Scalar/LoopRotation.cpp
parentbcf26aee86b1ab15b3e1442483eaa7be9fa00a82 (diff)
downloadexternal_llvm-bd5426a4f263eca7893fc54775d6cd86e729e100.zip
external_llvm-bd5426a4f263eca7893fc54775d6cd86e729e100.tar.gz
external_llvm-bd5426a4f263eca7893fc54775d6cd86e729e100.tar.bz2
Preserve line number information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130536 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/LoopRotation.cpp')
-rw-r--r--lib/Transforms/Scalar/LoopRotation.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/LoopRotation.cpp b/lib/Transforms/Scalar/LoopRotation.cpp
index e7b1a03..47dced3 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.