summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-09-19 04:30:36 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-09-19 04:30:36 +0000
commit73b65d236cb931877aa3f8a196068dcbeb9b57e9 (patch)
tree783783335fe3158232e451b0bcd0048159facfd1
parent9f834735cd64fd23dfeb88defcc509220f84518b (diff)
downloadbcm5719-llvm-73b65d236cb931877aa3f8a196068dcbeb9b57e9.tar.gz
bcm5719-llvm-73b65d236cb931877aa3f8a196068dcbeb9b57e9.zip
Omit all the extra static attributes on subprograms in -gmlt
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). llvm-svn: 218098
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp3
-rw-r--r--llvm/test/DebugInfo/gmlt.ll (renamed from llvm/test/DebugInfo/cu-line-tables.ll)9
2 files changed, 12 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
index 8561b5dd4f4..0c3c258e1f7 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
@@ -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
diff --git a/llvm/test/DebugInfo/cu-line-tables.ll b/llvm/test/DebugInfo/gmlt.ll
index f81b01e54cb..3ace56feae5 100644
--- a/llvm/test/DebugInfo/cu-line-tables.ll
+++ b/llvm/test/DebugInfo/gmlt.ll
@@ -16,6 +16,15 @@
; 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.
OpenPOWER on IntegriCloud