summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 4391e80c6cc..e61e22abe82 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -954,11 +954,12 @@ static bool needFuncLabelsForEHOrDebugInfo(const MachineFunction &MF,
if (!MF.getLandingPads().empty() || MF.hasEHFunclets() || MMI->hasDebugInfo())
return true;
- // We might emit an LSDA anyway if we have an EH personality.
- const Constant *PerFn = MF.getFunction()->getPersonalityFn();
- if (!PerFn)
+ // We might emit an EH table that uses function begin and end labels even if
+ // we don't have any landingpads.
+ if (!MF.getFunction()->hasPersonalityFn())
return false;
- return !isNoOpWithoutInvoke(classifyEHPersonality(PerFn));
+ return !isNoOpWithoutInvoke(
+ classifyEHPersonality(MF.getFunction()->getPersonalityFn()));
}
/// EmitFunctionBody - This method emits the body and trailer for a
OpenPOWER on IntegriCloud