Skip to content

Commit

Permalink
DebugInfo: Don't include DW_AT_inline on each abstract definition mul…
Browse files Browse the repository at this point in the history
…tiple times.

When I refactored this in r208636 I accidentally caused this to be added
multiple times to each abstract subprogram (not accounting for the
deduplicating effect of the InlinedSubprogramDIEs set).

This got better in r208798 when the abstract definitions got the
attribute added to them at construction time, but still had the
redundant copies introduced in r208636.

This commit removes those excess DW_AT_inlines and relies solely on the
insertion in r208798.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209166 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
dwblaikie committed May 19, 2014
1 parent df29a10 commit 76f1938
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,6 @@ DwarfDebug::constructInlinedScopeDIE(DwarfCompileUnit &TheCU,
attachRangesOrLowHighPC(TheCU, *ScopeDIE, Scope->getRanges());

InlinedSubprogramDIEs.insert(OriginDIE);
TheCU.addUInt(*OriginDIE, dwarf::DW_AT_inline, None, dwarf::DW_INL_inlined);

// Add the call site information to the DIE.
DILocation DL(Scope->getInlinedAt());
Expand Down
3 changes: 3 additions & 0 deletions test/DebugInfo/X86/concrete_out_of_line.ll
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,13 @@
; CHECK-NEXT: DW_AT_specification {{.*}} {[[DTOR_DECL]]}
; CHECK-NEXT: DW_AT_{{.*}}linkage_name
; CHECK-NEXT: DW_AT_inline
; CHECK-NOT: DW_AT_inline
; CHECK: [[D2_ABS]]: DW_TAG_subprogram
; CHECK-NEXT: DW_AT_specification {{.*}} {[[DTOR_DECL]]}
; CHECK-NEXT: DW_AT_{{.*}}linkage_name
; CHECK-NEXT: DW_AT_inline
; CHECK-NOT: DW_AT_inline
; CHECK: DW_TAG

; and then that a TAG_subprogram refers to it with AT_abstract_origin.

Expand Down

0 comments on commit 76f1938

Please sign in to comment.