File tree 5 files changed +11
-27
lines changed
5 files changed +11
-27
lines changed Original file line number Diff line number Diff line change 52
52
53
53
using namespace llvm ;
54
54
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
-
65
55
DwarfCompileUnit::DwarfCompileUnit (unsigned UID, const DICompileUnit *Node,
66
56
AsmPrinter *A, DwarfDebug *DW,
67
57
DwarfFile *DWU)
@@ -771,10 +761,7 @@ bool DwarfCompileUnit::hasDwarfPubSections() const {
771
761
if (CUNode->getGnuPubnames ())
772
762
return true ;
773
763
774
- if (DwarfPubSections == Default)
775
- return DD->tuneForGDB () && !includeMinimalInlineScopes ();
776
-
777
- return DwarfPubSections == Enable;
764
+ return DD->tuneForGDB () && !includeMinimalInlineScopes ();
778
765
}
779
766
780
767
// / addGlobalName - Add a new global name to the compile unit.
Original file line number Diff line number Diff line change 1
1
; REQUIRES: object-emission
2
2
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
4
4
; RUN: llvm-dwarfdump -debug-pubnames %t.o | FileCheck %s
5
5
; ModuleID = 'dwarf-public-names.cpp'
6
6
;
Original file line number Diff line number Diff line change 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
2
2
; CHECK-NOT: .asciz "X" ## External Name
3
3
; CHECK: .asciz "Y" ## External Name
4
4
; Test to check type with no definition is listed in pubtypes section.
Original file line number Diff line number Diff line change 1
1
; REQUIRES: object-emission
2
2
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
4
4
5
5
; struct foo {
6
6
; } f;
Original file line number Diff line number Diff line change 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
3
2
; RUN: llc -mtriple=x86_64-pc-linux-gnu -filetype=obj < %s | llvm-dwarfdump -v - | FileCheck --check-prefix=NONE %s
4
3
5
4
; Generated from:
16
15
; GPUB: DW_AT_GNU_pubnames
17
16
18
17
; 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"
24
22
25
23
; 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
29
26
30
27
; NONE: .debug_pubnames contents:
31
28
; NONE: {{^$}}
You can’t perform that action at this time.
0 commit comments