summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86FrameLowering.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2015-10-05 20:09:16 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2015-10-05 20:09:16 +0000
commite4f9b09b5156b5bdd479a98ce28042d2a7623a9b (patch)
tree108f3d21d78cba28587a376274b9a04c389f32f1 /llvm/lib/Target/X86/X86FrameLowering.cpp
parent46bc30472bd98182562446be98c4f27133a59a74 (diff)
downloadbcm5719-llvm-e4f9b09b5156b5bdd479a98ce28042d2a7623a9b.tar.gz
bcm5719-llvm-e4f9b09b5156b5bdd479a98ce28042d2a7623a9b.zip
[WinEH] Update CATCHRET's operand to match its successor
The CATCHRET operand did not match the MachineFunction's CFG. This mismatch happened because FrameLowering created a new MachineBasicBlock and updated the CFG but forgot to update the CATCHRET operand. Let's make sure this doesn't happen again by strengthing the funclet membership analysis: it can now reason about the membership of all basic blocks, not just those inside of funclets. llvm-svn: 249344
Diffstat (limited to 'llvm/lib/Target/X86/X86FrameLowering.cpp')
-rw-r--r--llvm/lib/Target/X86/X86FrameLowering.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86FrameLowering.cpp b/llvm/lib/Target/X86/X86FrameLowering.cpp
index c2c9f07ee10..1895cd87b10 100644
--- a/llvm/lib/Target/X86/X86FrameLowering.cpp
+++ b/llvm/lib/Target/X86/X86FrameLowering.cpp
@@ -1088,6 +1088,7 @@ void X86FrameLowering::emitEpilogue(MachineFunction &MF,
MBB.removeSuccessor(TargetMBB);
MBB.addSuccessor(RestoreMBB);
RestoreMBB->addSuccessor(TargetMBB);
+ MBBI->getOperand(0).setMBB(RestoreMBB);
}
// Fill EAX/RAX with the address of the target block.
OpenPOWER on IntegriCloud