Skip to content

Commit 02dbadb

Browse files
committed
Disable emission of aranges by default and add a command line
option to enable again that will be matched with a commit to enable in clang. llvm-svn: 201378
1 parent b575878 commit 02dbadb

File tree

6 files changed

+12
-8
lines changed

6 files changed

+12
-8
lines changed

llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ GenerateGnuPubSections("generate-gnu-dwarf-pub-sections", cl::Hidden,
6767
cl::desc("Generate GNU-style pubnames and pubtypes"),
6868
cl::init(false));
6969

70+
static cl::opt<bool> GenerateARangeSection("generate-arange-section",
71+
cl::Hidden,
72+
cl::desc("Generate dwarf aranges"),
73+
cl::init(false));
74+
7075
namespace {
7176
enum DefaultOnOff { Default, Enable, Disable };
7277
}
@@ -1154,7 +1159,8 @@ void DwarfDebug::endModule() {
11541159
emitDebugLoc();
11551160

11561161
// Emit info into a debug aranges section.
1157-
emitDebugARanges();
1162+
if (GenerateARangeSection)
1163+
emitDebugARanges();
11581164

11591165
// Emit info into a debug ranges section.
11601166
emitDebugRanges();

llvm/test/DebugInfo/X86/arange.ll

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
; REQUIRES: object-emission
22

3-
; RUN: llc -mtriple=x86_64-linux -O0 -filetype=obj < %s | llvm-dwarfdump -debug-dump=aranges - | FileCheck %s
4-
; RUN: llc -mtriple=x86_64-linux -O0 -filetype=obj < %s | llvm-readobj --relocations - | FileCheck --check-prefix=OBJ %s
3+
; RUN: llc -mtriple=x86_64-linux -O0 -filetype=obj -generate-arange-section < %s | llvm-dwarfdump -debug-dump=aranges - | FileCheck %s
4+
; RUN: llc -mtriple=x86_64-linux -O0 -filetype=obj -generate-arange-section < %s | llvm-readobj --relocations - | FileCheck --check-prefix=OBJ %s
55

66
; extern int i;
77
; template<int *x>

llvm/test/DebugInfo/X86/dwarf-aranges-no-dwarf-labels.ll

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: llc < %s | FileCheck %s
1+
; RUN: llc -generate-arange-section < %s | FileCheck %s
22

33
; CHECK: .short 2 # DWARF Arange version number
44
; CHECK: # Segment Size

llvm/test/DebugInfo/X86/dwarf-aranges.ll

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: llc < %s | FileCheck %s
1+
; RUN: llc -generate-arange-section < %s | FileCheck %s
22

33

44
; -- header --

llvm/test/DebugInfo/X86/fission-cu.ll

-2
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,5 @@
110110
; OBJ-NEXT: R_X86_64_32 .debug_addr
111111
; OBJ-NEXT: R_X86_64_32 .debug_str
112112
; OBJ-NEXT: }
113-
; OBJ: .debug_aranges
114-
; OBJ-NEXT: R_X86_64_32 .debug_info 0x0
115113

116114
!9 = metadata !{i32 1, metadata !"Debug Info Version", i32 1}

llvm/test/DebugInfo/X86/multiple-aranges.ll

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: llc < %s | FileCheck %s
1+
; RUN: llc -generate-arange-section < %s | FileCheck %s
22

33
; First CU
44
; CHECK: .long 44 # Length of ARange Set

0 commit comments

Comments
 (0)