Skip to content

Commit 876da02

Browse files
committedSep 12, 2017
Remove -generate-dwarf-pub-sections flag.
This flag is unnecessary for testing because we can get the coverage we need by adjusting CU attributes. Differential Revision: https://reviews.llvm.org/D37725 llvm-svn: 313079
1 parent b52e236 commit 876da02

File tree

5 files changed

+11
-27
lines changed

5 files changed

+11
-27
lines changed
 

Diff for: ‎llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp

+1-14
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,6 @@
5252

5353
using namespace llvm;
5454

55-
enum DefaultOnOff { Default, Enable, Disable };
56-
57-
static cl::opt<DefaultOnOff>
58-
DwarfPubSections("generate-dwarf-pub-sections", cl::Hidden,
59-
cl::desc("Generate DWARF pubnames and pubtypes sections"),
60-
cl::values(clEnumVal(Default, "Default for platform"),
61-
clEnumVal(Enable, "Enabled"),
62-
clEnumVal(Disable, "Disabled")),
63-
cl::init(Default));
64-
6555
DwarfCompileUnit::DwarfCompileUnit(unsigned UID, const DICompileUnit *Node,
6656
AsmPrinter *A, DwarfDebug *DW,
6757
DwarfFile *DWU)
@@ -771,10 +761,7 @@ bool DwarfCompileUnit::hasDwarfPubSections() const {
771761
if (CUNode->getGnuPubnames())
772762
return true;
773763

774-
if (DwarfPubSections == Default)
775-
return DD->tuneForGDB() && !includeMinimalInlineScopes();
776-
777-
return DwarfPubSections == Enable;
764+
return DD->tuneForGDB() && !includeMinimalInlineScopes();
778765
}
779766

780767
/// addGlobalName - Add a new global name to the compile unit.

Diff for: ‎llvm/test/DebugInfo/Generic/dwarf-public-names.ll

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

3-
; RUN: %llc_dwarf -generate-dwarf-pub-sections=Enable -filetype=obj -o %t.o < %s
3+
; RUN: %llc_dwarf -debugger-tune=gdb -filetype=obj -o %t.o < %s
44
; RUN: llvm-dwarfdump -debug-pubnames %t.o | FileCheck %s
55
; ModuleID = 'dwarf-public-names.cpp'
66
;

Diff for: ‎llvm/test/DebugInfo/X86/2010-04-13-PubType.ll

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: llc -O0 -asm-verbose -mtriple=x86_64-macosx -generate-dwarf-pub-sections=Enable < %s | FileCheck %s
1+
; RUN: llc -O0 -asm-verbose -mtriple=x86_64-macosx -debugger-tune=gdb < %s | FileCheck %s
22
; CHECK-NOT: .asciz "X" ## External Name
33
; CHECK: .asciz "Y" ## External Name
44
; Test to check type with no definition is listed in pubtypes section.

Diff for: ‎llvm/test/DebugInfo/X86/c-type-units.ll

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

3-
; RUN: llc -o - %s -filetype=obj -O0 -generate-dwarf-pub-sections=Disable -generate-type-units -mtriple=x86_64-unknown-linux-gnu | llvm-dwarfdump -debug-types - | FileCheck %s
3+
; RUN: llc -o - %s -filetype=obj -O0 -debugger-tune=lldb -generate-type-units -mtriple=x86_64-unknown-linux-gnu | llvm-dwarfdump -debug-types - | FileCheck %s
44

55
; struct foo {
66
; } f;

Diff for: ‎llvm/test/DebugInfo/X86/gnu-public-names-gmlt.ll

+7-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
; RUN: sed -e 's/gnuPubnames: false/gnuPubnames: true/' %s | llc -mtriple=x86_64-pc-linux-gnu -filetype=obj | llvm-dwarfdump -v - | FileCheck --check-prefix=GPUB --check-prefix=CHECK %s
2-
; RUN: llc -mtriple=x86_64-pc-linux-gnu -filetype=obj < %s -generate-dwarf-pub-sections=Enable | llvm-dwarfdump -v - | FileCheck --check-prefix=PUB --check-prefix=CHECK %s
1+
; RUN: sed -e 's/gnuPubnames: false/gnuPubnames: true/' %s | llc -mtriple=x86_64-pc-linux-gnu -filetype=obj | llvm-dwarfdump -v - | FileCheck --check-prefix=GPUB %s
32
; RUN: llc -mtriple=x86_64-pc-linux-gnu -filetype=obj < %s | llvm-dwarfdump -v - | FileCheck --check-prefix=NONE %s
43

54
; Generated from:
@@ -16,16 +15,14 @@
1615
; GPUB: DW_AT_GNU_pubnames
1716

1817
; GPUB: .debug_gnu_pubnames contents:
19-
; PUB: .debug_pubnames contents:
20-
; CHECK-NEXT: unit_offset = 0x00000000
21-
; CHECK-NEXT: Name
22-
; CHECK-NEXT: "f2"
23-
; CHECK-NEXT: "f3"
18+
; GPUB-NEXT: unit_offset = 0x00000000
19+
; GPUB-NEXT: Name
20+
; GPUB-NEXT: "f2"
21+
; GPUB-NEXT: "f3"
2422

2523
; GPUB: .debug_gnu_pubtypes contents:
26-
; PUB: .debug_pubtypes contents:
27-
; CHECK-NEXT: length = 0x0000000e version = 0x0002 unit_offset = 0x00000000
28-
; CHECK-NEXT: Name
24+
; GPUB-NEXT: length = 0x0000000e version = 0x0002 unit_offset = 0x00000000
25+
; GPUB-NEXT: Name
2926

3027
; NONE: .debug_pubnames contents:
3128
; NONE: {{^$}}

0 commit comments

Comments
 (0)
Please sign in to comment.