forked from OSchip/llvm-project
Relax this condition.
Some passes require breaking critical edges before they're called. Don't segfault because of that. llvm-svn: 140196
This commit is contained in:
parent
04289fcad8
commit
a6e1c51ed7
|
@ -178,8 +178,7 @@ BasicBlock *llvm::SplitCriticalEdge(TerminatorInst *TI, unsigned 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!");
|
||||
if (DestBB->isLandingPad()) return 0;
|
||||
|
||||
// Create a new basic block, linking it into the CFG.
|
||||
BasicBlock *NewBB = BasicBlock::Create(TI->getContext(),
|
||||
|
|
Loading…
Reference in New Issue