aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineModuleInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/MachineModuleInfo.cpp')
-rw-r--r--lib/CodeGen/MachineModuleInfo.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/MachineModuleInfo.cpp b/lib/CodeGen/MachineModuleInfo.cpp
index 32d8394527..6ac038a1d9 100644
--- a/lib/CodeGen/MachineModuleInfo.cpp
+++ b/lib/CodeGen/MachineModuleInfo.cpp
@@ -1728,6 +1728,10 @@ void MachineModuleInfo::TidyLandingPads() {
LandingPadInfo &LandingPad = LandingPads[i];
LandingPad.LandingPadLabel = MappedLabel(LandingPad.LandingPadLabel);
+ if (!LandingPad.LandingPadBlock)
+ // Must not have cleanups if no landing pad.
+ LandingPad.TypeIds.clear();
+
// Special case: we *should* emit LPs with null LP MBB. This indicates
// "rethrow" case.
if (!LandingPad.LandingPadLabel && LandingPad.LandingPadBlock) {