Don't prime the section map.
authorRafael Espindola <rafael.espindola@gmail.com>
Mon, 9 Mar 2015 20:09:58 +0000 (20:09 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Mon, 9 Mar 2015 20:09:58 +0000 (20:09 +0000)
This was just creating unused labels for .text when the module had no
functions.

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

lib/CodeGen/AsmPrinter/DwarfDebug.cpp
test/DebugInfo/X86/multiple-aranges.ll

index 40c7f3b0dec5c0b531727ab1750b8f64c0952098..04dedbd3f6531871c6083f099b3b1b712440a37f 100644 (file)
@@ -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()) {
index a3f66bb6d34b2bf7f165a06a4b78d0bcd7cfd59a..80970695a55131d0890666a54a9648e1a3ec5e45 100644 (file)
@@ -1,7 +1,10 @@
 ; RUN: llc -generate-arange-section < %s | FileCheck %s
 
+; CHECK: .Ldebug_end0:
+; CHECK-NEXT: .section .debug_aranges,"",@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)