summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-04-05 23:43:11 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-04-05 23:43:11 +0000
commit3e22897fa9f07fc641b07d2e12101d21f84da668 (patch)
treed4f6ce15193322314f59d71e2063b5e69b2091ff /lib
parentcaf767bb027088e28460cde21c721cda681e38fc (diff)
downloadllvm-3e22897fa9f07fc641b07d2e12101d21f84da668.tar.gz
llvm-3e22897fa9f07fc641b07d2e12101d21f84da668.tar.bz2
llvm-3e22897fa9f07fc641b07d2e12101d21f84da668.tar.xz
Permit blocks to branch directly to a landing pad.
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
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/MachineVerifier.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/MachineVerifier.cpp b/lib/CodeGen/MachineVerifier.cpp
index a47709edb1..f95f4112ae 100644
--- a/lib/CodeGen/MachineVerifier.cpp
+++ b/lib/CodeGen/MachineVerifier.cpp
@@ -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) {