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:
Bill Wendling 2011-09-20 22:28:17 +00:00
parent 04289fcad8
commit a6e1c51ed7
1 changed files with 1 additions and 2 deletions

View File

@ -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(),