]> granicus.if.org Git - llvm/commitdiff
Omit all the extra static attributes on subprograms in -gmlt
authorDavid Blaikie <dblaikie@gmail.com>
Fri, 19 Sep 2014 04:30:36 +0000 (04:30 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Fri, 19 Sep 2014 04:30:36 +0000 (04:30 +0000)
This omission will be done in a fancier manner once we're dealing with
"put gmlt in the skeleton CUs under fission" - it'll have to be
conditional on the kind of CU we're emitting into (skeleton or gmlt).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218098 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DwarfUnit.cpp
test/DebugInfo/gmlt.ll [moved from test/DebugInfo/cu-line-tables.ll with 90% similarity]

index 8561b5dd4f4c2d4fe82eaec1b40a4724947057fa..0c3c258e1f7bbe9731912399b39f73c7ca2f47e3 100644 (file)
@@ -1482,6 +1482,9 @@ void DwarfUnit::applySubprogramAttributes(DISubprogram SP, DIE &SPDie) {
   if (!SP.getName().empty())
     addString(SPDie, dwarf::DW_AT_name, SP.getName());
 
+  if(getCUNode().getEmissionKind() == DIBuilder::LineTablesOnly)
+    return;
+
   addSourceLine(SPDie, SP);
 
   // Add the prototype if we have a prototype and we have a C like
similarity index 90%
rename from test/DebugInfo/cu-line-tables.ll
rename to test/DebugInfo/gmlt.ll
index f81b01e54cbefd9b6cd2c7de33cfe715f88b297b..3ace56feae5655765fa6168772586ead27ffc123 100644 (file)
 ; attribute on the CU.
 ; CHECK: DW_TAG_compile_unit
 ; CHECK-NOT: DW_AT_ranges
+; CHECK-NOT: {{DW_TAG|NULL}}
+; Check that we only provide the minimal attributes on a subprogram to save space.
+; CHECK:   DW_TAG_subprogram
+; CHECK-NEXT:     DW_AT_low_pc
+; CHECK-NEXT:     DW_AT_high_pc
+; FIXME: We don't need the DW_AT_frame_base for -gmlt.
+; CHECK-NEXT:     DW_AT_frame_base
+; CHECK-NEXT:     DW_AT_name
+; CHECK-NOT: DW_AT
 ; CHECK: {{DW_TAG|NULL}}
 
 ; FIXME: We probably want to avoid printing out anything if the section isn't there.