Permit blocks to branch directly to a landing pad.

Treat the landing pad as a normal successor when that happens.

llvm-svn: 128961
This commit is contained in:
Jakob Stoklund Olesen 2011-04-05 23:43:11 +00:00
parent f642c1b600
commit 30b5473d82
1 changed files with 5 additions and 0 deletions

View File

@ -402,6 +402,11 @@ MachineVerifier::visitMachineBasicBlockBefore(const MachineBasicBlock *MBB) {
SmallVector<MachineOperand, 4> Cond;
if (!TII->AnalyzeBranch(*const_cast<MachineBasicBlock *>(MBB),
TBB, FBB, Cond)) {
// If the block branches directly to a landing pad successor, pretend that
// the landing pad is a normal block.
LandingPadSuccs.erase(TBB);
LandingPadSuccs.erase(FBB);
// Ok, AnalyzeBranch thinks it knows what's going on with this block. Let's
// check whether its answers match up with reality.
if (!TBB && !FBB) {