]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - opencl/llvm.git/commitdiff
DebugInfo: Don't include DW_AT_inline on each abstract definition multiple times.
authorDavid Blaikie <dblaikie@gmail.com>
Mon, 19 May 2014 22:07:16 +0000 (22:07 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Mon, 19 May 2014 22:07:16 +0000 (22:07 +0000)
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

lib/CodeGen/AsmPrinter/DwarfDebug.cpp
test/DebugInfo/X86/concrete_out_of_line.ll

index d26c3d8686310457bc2d26c648b53666a0ed5c14..f584c2a036fd49e08e8c58f6e8878af04f987e2c 100644 (file)
@@ -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());
index 63607e5a3a71d8c6d2794ddb2e00d5146c652fbf..ae025ad0de3329c9c644ac908db1130746f98f80 100644 (file)
 ; 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.