[llvm] r231904 - Don't print labels that on ELF are never used.

Rafael Espindola rafael.espindola at gmail.com
Tue Mar 10 21:20:32 PDT 2015


Author: rafael
Date: Tue Mar 10 23:20:31 2015
New Revision: 231904

URL: http://llvm.org/viewvc/llvm-project?rev=231904&view=rev
Log:
Don't print labels that on ELF are never used.

Modified:
    llvm/trunk/lib/MC/MCObjectFileInfo.cpp
    llvm/trunk/test/DebugInfo/X86/stmt-list.ll
    llvm/trunk/test/MC/ELF/gen-dwarf.s

Modified: llvm/trunk/lib/MC/MCObjectFileInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCObjectFileInfo.cpp?rev=231904&r1=231903&r2=231904&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCObjectFileInfo.cpp (original)
+++ llvm/trunk/lib/MC/MCObjectFileInfo.cpp Tue Mar 10 23:20:31 2015
@@ -459,8 +459,7 @@ void MCObjectFileInfo::InitELFMCObjectFi
                                           "section_abbrev");
   DwarfInfoSection =
       Ctx->getELFSection(".debug_info", ELF::SHT_PROGBITS, 0, "section_info");
-  DwarfLineSection =
-      Ctx->getELFSection(".debug_line", ELF::SHT_PROGBITS, 0, "section_line");
+  DwarfLineSection = Ctx->getELFSection(".debug_line", ELF::SHT_PROGBITS, 0);
   DwarfFrameSection = Ctx->getELFSection(".debug_frame", ELF::SHT_PROGBITS, 0);
   DwarfPubNamesSection =
       Ctx->getELFSection(".debug_pubnames", ELF::SHT_PROGBITS, 0);
@@ -470,11 +469,10 @@ void MCObjectFileInfo::InitELFMCObjectFi
       Ctx->getELFSection(".debug_gnu_pubnames", ELF::SHT_PROGBITS, 0);
   DwarfGnuPubTypesSection =
       Ctx->getELFSection(".debug_gnu_pubtypes", ELF::SHT_PROGBITS, 0);
-  DwarfStrSection = Ctx->getELFSection(".debug_str", ELF::SHT_PROGBITS,
-                                       ELF::SHF_MERGE | ELF::SHF_STRINGS, 1, "",
-                                       "info_string");
-  DwarfLocSection = Ctx->getELFSection(".debug_loc", ELF::SHT_PROGBITS, 0,
-                                       "section_debug_loc");
+  DwarfStrSection =
+      Ctx->getELFSection(".debug_str", ELF::SHT_PROGBITS,
+                         ELF::SHF_MERGE | ELF::SHF_STRINGS, 1, "");
+  DwarfLocSection = Ctx->getELFSection(".debug_loc", ELF::SHT_PROGBITS, 0);
   DwarfARangesSection =
       Ctx->getELFSection(".debug_aranges", ELF::SHT_PROGBITS, 0);
   DwarfRangesSection =
@@ -493,15 +491,15 @@ void MCObjectFileInfo::InitELFMCObjectFi
       Ctx->getELFSection(".apple_types", ELF::SHT_PROGBITS, 0, "types_begin");
 
   // Fission Sections
-  DwarfInfoDWOSection = Ctx->getELFSection(".debug_info.dwo", ELF::SHT_PROGBITS,
-                                           0, "section_info_dwo");
-  DwarfTypesDWOSection = Ctx->getELFSection(
-      ".debug_types.dwo", ELF::SHT_PROGBITS, 0, "section_types_dwo");
-  DwarfAbbrevDWOSection = Ctx->getELFSection(
-      ".debug_abbrev.dwo", ELF::SHT_PROGBITS, 0, "section_abbrev_dwo");
-  DwarfStrDWOSection = Ctx->getELFSection(".debug_str.dwo", ELF::SHT_PROGBITS,
-                                          ELF::SHF_MERGE | ELF::SHF_STRINGS, 1,
-                                          "", "skel_string");
+  DwarfInfoDWOSection =
+      Ctx->getELFSection(".debug_info.dwo", ELF::SHT_PROGBITS, 0);
+  DwarfTypesDWOSection =
+      Ctx->getELFSection(".debug_types.dwo", ELF::SHT_PROGBITS, 0);
+  DwarfAbbrevDWOSection =
+      Ctx->getELFSection(".debug_abbrev.dwo", ELF::SHT_PROGBITS, 0);
+  DwarfStrDWOSection =
+      Ctx->getELFSection(".debug_str.dwo", ELF::SHT_PROGBITS,
+                         ELF::SHF_MERGE | ELF::SHF_STRINGS, 1, "");
   DwarfLineDWOSection =
       Ctx->getELFSection(".debug_line.dwo", ELF::SHT_PROGBITS, 0);
   DwarfLocDWOSection =

Modified: llvm/trunk/test/DebugInfo/X86/stmt-list.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/stmt-list.ll?rev=231904&r1=231903&r2=231904&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/stmt-list.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/stmt-list.ll Tue Mar 10 23:20:31 2015
@@ -3,7 +3,6 @@
 ; CHECK:      .long   .Lline_table_start0          # DW_AT_stmt_list
 
 ; CHECK:      .section        .debug_line,"", at progbits
-; CHECK-NEXT: .Lsection_line:
 ; CHECK-NEXT: .Lline_table_start0:
 
 define void @f() {

Modified: llvm/trunk/test/MC/ELF/gen-dwarf.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ELF/gen-dwarf.s?rev=231904&r1=231903&r2=231904&view=diff
==============================================================================
--- llvm/trunk/test/MC/ELF/gen-dwarf.s (original)
+++ llvm/trunk/test/MC/ELF/gen-dwarf.s Tue Mar 10 23:20:31 2015
@@ -49,7 +49,6 @@ foo:
 // ASM-NEXT: .long [[LINE_LABEL:.L[a-z0-9]+]]
 
 // ASM: .section .debug_line
-// ASM-NEXT:.Lsection_line:
 // ASM-NEXT: [[LINE_LABEL]]
 
 // DWARF1: Dwarf version 1 is not supported.





More information about the llvm-commits mailing list