Omit DW_AT_inline under -gmlt to save a little more space.
authorDavid Blaikie <dblaikie@gmail.com>
Tue, 30 Sep 2014 23:29:16 +0000 (23:29 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Tue, 30 Sep 2014 23:29:16 +0000 (23:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218719 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DwarfDebug.cpp
test/DebugInfo/Inputs/gmlt.ll

index 8dfd1c33912e8affab9f95464c3e84dfb4780064..4745974a3d2fbbdd96bd473451d1f5fda2f4cf1e 100644 (file)
@@ -526,7 +526,8 @@ void DwarfDebug::constructAbstractSubprogramScopeDIE(DwarfCompileUnit &TheCU,
                                  DIDescriptor());
   SPCU.applySubprogramAttributesToDefinition(SP, *AbsDef);
 
-  SPCU.addUInt(*AbsDef, dwarf::DW_AT_inline, None, dwarf::DW_INL_inlined);
+  if (TheCU.getCUNode().getEmissionKind() != DIBuilder::LineTablesOnly)
+    SPCU.addUInt(*AbsDef, dwarf::DW_AT_inline, None, dwarf::DW_INL_inlined);
   if (DIE *ObjectPointer = createAndAddScopeChildren(SPCU, Scope, *AbsDef))
     SPCU.addDIEEntry(*AbsDef, dwarf::DW_AT_object_pointer, *ObjectPointer);
 }
index cfb01da7df1a9d7c8629d160e80599d8bd5692e7..d7fa7fd60e5eb426cc281f7f696dc1067affcf7a 100644 (file)
@@ -50,7 +50,6 @@
 ; the absence of high_pc/low_pc/ranges and know that they just need it for
 ; retrieving the name of a concrete inlined instance
 
-; CHECK-NEXT:     DW_AT_inline
 ; CHECK-NOT: {{DW_TAG|DW_AT|NULL}}
 
 ; Check that we only provide the minimal attributes on a subprogram to save space.