summaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfCFIException.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfCFIException.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp b/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
index d975f1f97b..8ed4f4c43a 100644
--- a/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
@@ -142,14 +142,12 @@ void DwarfCFIException::EndFunction() {
Asm->OutStreamer.EmitCFIEndProc();
- if (!shouldEmitPersonality)
- return;
-
Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("eh_func_end",
Asm->getFunctionNumber()));
// Map all labels and get rid of any dead landing pads.
MMI->TidyLandingPads();
- EmitExceptionTable();
+ if (shouldEmitPersonality)
+ EmitExceptionTable();
}