[llvm] r202201 - DwarfDebug: Avoid emitting an empty debug_aranges section when aranges are disabled
David Blaikie
dblaikie at gmail.com
Tue Feb 25 14:46:45 PST 2014
Author: dblaikie
Date: Tue Feb 25 16:46:44 2014
New Revision: 202201
URL: http://llvm.org/viewvc/llvm-project?rev=202201&view=rev
Log:
DwarfDebug: Avoid emitting an empty debug_aranges section when aranges are disabled
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/trunk/test/DebugInfo/X86/fission-cu.ll
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=202201&r1=202200&r2=202201&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Tue Feb 25 16:46:44 2014
@@ -1941,7 +1941,8 @@ void DwarfDebug::emitSectionLabels() {
if (useSplitDwarf())
DwarfAbbrevDWOSectionSym = emitSectionSym(
Asm, TLOF.getDwarfAbbrevDWOSection(), "section_abbrev_dwo");
- emitSectionSym(Asm, TLOF.getDwarfARangesSection());
+ if (GenerateARangeSection)
+ emitSectionSym(Asm, TLOF.getDwarfARangesSection());
DwarfLineSectionSym =
emitSectionSym(Asm, TLOF.getDwarfLineSection(), "section_line");
Modified: llvm/trunk/test/DebugInfo/X86/fission-cu.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/fission-cu.ll?rev=202201&r1=202200&r2=202201&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/fission-cu.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/fission-cu.ll Tue Feb 25 16:46:44 2014
@@ -1,6 +1,7 @@
; RUN: llc -split-dwarf=Enable -generate-cu-hash -O0 %s -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o %t
; RUN: llvm-dwarfdump -debug-dump=all %t | FileCheck %s
; RUN: llvm-readobj --relocations %t | FileCheck --check-prefix=OBJ %s
+; RUN: llvm-objdump -h %t | FileCheck --check-prefix=HDR %s
@a = common global i32 0, align 4
@@ -111,4 +112,6 @@
; OBJ-NEXT: R_X86_64_32 .debug_str
; OBJ-NEXT: }
+; HDR-NOT: .debug_aranges
+
!9 = metadata !{i32 1, metadata !"Debug Info Version", i32 1}
More information about the llvm-commits
mailing list