summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 3721458d699..0f9edf1d0e9 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -556,7 +556,7 @@ void AsmPrinter::EmitFunctionHeader() {
OutStreamer.EmitLabel(DeadBlockSyms[i]);
}
- if (!MMI->getLandingPads().empty()) {
+ if (!MMI->getLandingPads().empty() || MMI->hasDebugInfo()) {
CurrentFnBegin = createTempSymbol("func_begin", getFunctionNumber());
if (MAI->useAssignmentForEHBegin()) {
@@ -882,7 +882,8 @@ void AsmPrinter::EmitFunctionBody() {
// Emit target-specific gunk after the function body.
EmitFunctionBodyEnd();
- if (!MMI->getLandingPads().empty() || MAI->hasDotTypeDotSizeDirective()) {
+ if (!MMI->getLandingPads().empty() || MMI->hasDebugInfo() ||
+ MAI->hasDotTypeDotSizeDirective()) {
// Create a symbol for the end of function.
CurrentFnEnd = createTempSymbol("func_end", getFunctionNumber());
OutStreamer.EmitLabel(CurrentFnEnd);
OpenPOWER on IntegriCloud