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
This commit is contained in:
Devang Patel 2009-04-15 19:42:57 +00:00
parent 9407cd4ede
commit c782ad055e

View File

@ -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);