mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 18:24:23 +00:00
[BasicBlockUtils] Set debug locations for instructions created in SplitBlockPredecessors.
Test Plan: regression test suite Reviewers: eugenis, dblaikie Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10343 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239438 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -486,11 +486,12 @@ BasicBlock *llvm::SplitBlockPredecessors(BasicBlock *BB,
|
||||
}
|
||||
|
||||
// Create new basic block, insert right before the original block.
|
||||
BasicBlock *NewBB = BasicBlock::Create(BB->getContext(), BB->getName()+Suffix,
|
||||
BB->getParent(), BB);
|
||||
BasicBlock *NewBB = BasicBlock::Create(
|
||||
BB->getContext(), BB->getName() + Suffix, BB->getParent(), BB);
|
||||
|
||||
// The new block unconditionally branches to the old block.
|
||||
BranchInst *BI = BranchInst::Create(BB, NewBB);
|
||||
BI->setDebugLoc(BB->getFirstNonPHI()->getDebugLoc());
|
||||
|
||||
// Move the edges from Preds to point to NewBB instead of BB.
|
||||
for (unsigned i = 0, e = Preds.size(); i != e; ++i) {
|
||||
@ -553,6 +554,7 @@ void llvm::SplitLandingPadPredecessors(BasicBlock *OrigBB,
|
||||
|
||||
// The new block unconditionally branches to the old block.
|
||||
BranchInst *BI1 = BranchInst::Create(OrigBB, NewBB1);
|
||||
BI1->setDebugLoc(OrigBB->getFirstNonPHI()->getDebugLoc());
|
||||
|
||||
// Move the edges from Preds to point to NewBB1 instead of OrigBB.
|
||||
for (unsigned i = 0, e = Preds.size(); i != e; ++i) {
|
||||
@ -593,6 +595,7 @@ void llvm::SplitLandingPadPredecessors(BasicBlock *OrigBB,
|
||||
|
||||
// The new block unconditionally branches to the old block.
|
||||
BranchInst *BI2 = BranchInst::Create(OrigBB, NewBB2);
|
||||
BI2->setDebugLoc(OrigBB->getFirstNonPHI()->getDebugLoc());
|
||||
|
||||
// Move the remaining edges from OrigBB to point to NewBB2.
|
||||
for (SmallVectorImpl<BasicBlock*>::iterator
|
||||
|
Reference in New Issue
Block a user