From c782ad055e7d1ed11bf0b7cbd17b5a8b6efdde7e Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Wed, 15 Apr 2009 19:42:57 +0000 Subject: [PATCH] Check isInlinedSubroutine() before creating DW_TAG_inlined_subroutine. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69202 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter/DwarfWriter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/CodeGen/AsmPrinter/DwarfWriter.cpp b/lib/CodeGen/AsmPrinter/DwarfWriter.cpp index 597f925f51c..d30e909d83a 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);