aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfWriter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfWriter.cpp b/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
index 597f925f51..d30e909d83 100644
--- a/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
@@ -2091,7 +2091,8 @@ private:
ConstructDbgScope(Scope, ParentStartID, ParentEndID, ParentDie, Unit);
} else {
DIE *ScopeDie = NULL;
- if (MainCU && TAI->doesDwarfUsesInlineInfoSection()) {
+ if (MainCU && TAI->doesDwarfUsesInlineInfoSection()
+ && Scope->isInlinedSubroutine()) {
ScopeDie = new DIE(DW_TAG_inlined_subroutine);
DIE *Origin = MainCU->getDieMapSlotFor(Scope->getDesc().getGV());
AddDIEntry(ScopeDie, DW_AT_abstract_origin, DW_FORM_ref4, Origin);