[llvm] r231694 - Don't prime the section map.

Rafael Espindola rafael.espindola at gmail.com
Mon Mar 9 13:09:58 PDT 2015


Author: rafael
Date: Mon Mar  9 15:09:58 2015
New Revision: 231694

URL: http://llvm.org/viewvc/llvm-project?rev=231694&view=rev
Log:
Don't prime the section map.

This was just creating unused labels for .text when the module had no
functions.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
    llvm/trunk/test/DebugInfo/X86/multiple-aranges.ll

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=231694&r1=231693&r2=231694&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Mon Mar  9 15:09:58 2015
@@ -1741,9 +1741,6 @@ void DwarfDebug::emitDebugARanges() {
   // Provides a unique id per text section.
   DenseMap<const MCSection *, SmallVector<SymbolCU, 8>> SectionMap;
 
-  // Prime section data.
-  SectionMap[Asm->getObjFileLowering().getTextSection()];
-
   // Filter labels by section.
   for (const SymbolCU &SCU : ArangeLabels) {
     if (SCU.Sym->isInSection()) {

Modified: llvm/trunk/test/DebugInfo/X86/multiple-aranges.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/multiple-aranges.ll?rev=231694&r1=231693&r2=231694&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/multiple-aranges.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/multiple-aranges.ll Mon Mar  9 15:09:58 2015
@@ -1,7 +1,10 @@
 ; RUN: llc -generate-arange-section < %s | FileCheck %s
 
+; CHECK: .Ldebug_end0:
+; CHECK-NEXT: .section .debug_aranges,"", at progbits
+
 ; First CU
-; CHECK:      .long   44                      # Length of ARange Set
+; CHECK-NEXT: .long   44                      # Length of ARange Set
 ; CHECK-NEXT: .short  2                       # DWARF Arange version number
 ; CHECK-NEXT: .long   .L.debug_info_begin0    # Offset Into Debug Info Section
 ; CHECK-NEXT: .byte   8                       # Address Size (in bytes)





More information about the llvm-commits mailing list