Permit blocks to branch directly to a landing pad.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 5 Apr 2011 23:43:11 +0000 (23:43 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 5 Apr 2011 23:43:11 +0000 (23:43 +0000)
Treat the landing pad as a normal successor when that happens.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128961 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/MachineVerifier.cpp

index a47709edb10417119b3c5f79f97e0f18ea7d2d8c..f95f4112aeda618bb2b4f7287d80233434283bbd 100644 (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) {