aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-05-17 19:43:06 +0000
committerDevang Patel <dpatel@apple.com>2011-05-17 19:43:06 +0000
commitc9ea771cb89567ba0df4a0dac58d707429e3fd31 (patch)
tree00b156025a9b72e03842411cf2b7e13cddce315c /lib/Transforms
parent416b7117b74d487b1531853eabf9cdb15d8bfdc4 (diff)
downloadexternal_llvm-c9ea771cb89567ba0df4a0dac58d707429e3fd31.zip
external_llvm-c9ea771cb89567ba0df4a0dac58d707429e3fd31.tar.gz
external_llvm-c9ea771cb89567ba0df4a0dac58d707429e3fd31.tar.bz2
Preserve line number information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131480 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Utils/BreakCriticalEdges.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Utils/BreakCriticalEdges.cpp b/lib/Transforms/Utils/BreakCriticalEdges.cpp
index caf2aeb..d6206a3 100644
--- a/lib/Transforms/Utils/BreakCriticalEdges.cpp
+++ b/lib/Transforms/Utils/BreakCriticalEdges.cpp
@@ -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);