mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-19 20:34:38 +00:00
Assert that we aren't trying to split the critical edge of a landing pad. Doing
so requires more care than this generic algorithm should handle. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137866 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ef3bf64bf8
commit
490606e613
@ -176,6 +176,11 @@ BasicBlock *llvm::SplitCriticalEdge(TerminatorInst *TI, unsigned SuccNum,
|
||||
BasicBlock *TIBB = TI->getParent();
|
||||
BasicBlock *DestBB = TI->getSuccessor(SuccNum);
|
||||
|
||||
// Splitting the critical edge to a landing pad block is non-trivial. Don't do
|
||||
// it in this generic function.
|
||||
assert(!DestBB->isLandingPad() &&
|
||||
"Cannot split critical edge to a landing pad block!");
|
||||
|
||||
// Create a new basic block, linking it into the CFG.
|
||||
BasicBlock *NewBB = BasicBlock::Create(TI->getContext(),
|
||||
TIBB->getName() + "." + DestBB->getName() + "_crit_edge");
|
||||
|
Loading…
x
Reference in New Issue
Block a user