[Frontend] Remove unused includes (NFC) (#116927)
[llvm-project.git] / llvm / test / tools / llvm-dwarfutil / ELF / X86 / gc-bfd.test
blob7e61036ae27de6f30a13fd946c35eec7d2c1de65
1 ## This test checks that debug info related to deleted code (marked with
2 ## tombstone=bfd) is removed.
4 # RUN: yaml2obj %s -o %t.o
6 # RUN: llvm-dwarfutil --tombstone=bfd --garbage-collection %t.o - | llvm-dwarfdump -a - | FileCheck %s
7 # RUN: llvm-dwarfutil --tombstone=universal --garbage-collection %t.o - | llvm-dwarfdump -a - | FileCheck %s
9 # CHECK: DW_TAG_compile_unit
10 # CHECK: DW_AT_name{{.*}}"CU1"
11 # CHECK: DW_TAG_class_type
12 # CHECK: DW_AT_name{{.*}}"class1"
13 # CHECK-NOT: DW_TAG_class_type
14 # CHECK-NOT: "class2"
15 # CHECK-NOT: "class3"
16 # CHECK: DW_TAG_subprogram
17 # CHECK: DW_AT_name{{.*}}"foo1"
18 # CHECK: DW_AT_low_pc{{.*}}0x0000000000001000
19 # CHECK: DW_AT_high_pc{{.*}}0x0000000000001010
20 # CHECK: DW_AT_type{{.*}}"class1"
21 # CHECK-NOT: DW_TAG_subprogram
22 # CHECK-NOT: "foo2"
25 --- !ELF
26 FileHeader:
27   Class:    ELFCLASS64
28   Data:     ELFDATA2LSB
29   Type:     ET_REL
30   Machine:  EM_X86_64
31 Sections:
32   - Name:            .text
33     Type:            SHT_PROGBITS
34     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
35     Address:         0x1000
36     Size:            0x1b
37 DWARF:
38   debug_abbrev:
39     - Table:
40       - Tag:      DW_TAG_compile_unit
41         Children: DW_CHILDREN_yes
42         Attributes:
43           - Attribute: DW_AT_producer
44             Form:      DW_FORM_string
45           - Attribute: DW_AT_language
46             Form:      DW_FORM_data2
47           - Attribute: DW_AT_name
48             Form:      DW_FORM_string
49           - Attribute: DW_AT_low_pc
50             Form:      DW_FORM_addr
51           - Attribute: DW_AT_high_pc
52             Form:      DW_FORM_data8
53       - Tag:      DW_TAG_subprogram
54         Children: DW_CHILDREN_no
55         Attributes:
56           - Attribute: DW_AT_name
57             Form:      DW_FORM_string
58           - Attribute: DW_AT_low_pc
59             Form:      DW_FORM_addr
60           - Attribute: DW_AT_high_pc
61             Form:      DW_FORM_data8
62           - Attribute: DW_AT_type
63             Form:      DW_FORM_ref4
64       - Tag:      DW_TAG_class_type
65         Children: DW_CHILDREN_yes
66         Attributes:
67           - Attribute: DW_AT_name
68             Form:      DW_FORM_string
69       - Tag:      DW_TAG_member
70         Children: DW_CHILDREN_no
71         Attributes:
72           - Attribute: DW_AT_type
73             Form:      DW_FORM_ref4
74           - Attribute: DW_AT_name
75             Form:      DW_FORM_string
76       - Tag:      DW_TAG_class_type
77         Children: DW_CHILDREN_no
78         Attributes:
79           - Attribute: DW_AT_name
80             Form:      DW_FORM_string
81           - Attribute: DW_AT_declaration
82             Form:      DW_FORM_flag_present
83       - Tag:      DW_TAG_class_type
84         Children: DW_CHILDREN_yes
85         Attributes:
86           - Attribute: DW_AT_name
87             Form:      DW_FORM_string
88           - Attribute: DW_AT_declaration
89             Form:      DW_FORM_flag_present
90       - Tag:      DW_TAG_template_type_parameter
91         Children: DW_CHILDREN_no
92         Attributes:
93           - Attribute: DW_AT_type
94             Form:      DW_FORM_ref4
95       - Tag:      DW_TAG_base_type
96         Children: DW_CHILDREN_no
97         Attributes:
98           - Attribute: DW_AT_name
99             Form:      DW_FORM_string
100   debug_info:
101     - Version: 4
102       Entries:
103         - AbbrCode: 1
104           Values:
105             - CStr: by_hand
106             - Value:  0x04
107             - CStr: CU1
108             - Value:  0x1000
109             - Value:  0x1b
110         - AbbrCode: 3
111           Values:
112             - CStr: class1
113         - AbbrCode: 4
114           Values:
115             - Value:  0x0000006c
116             - CStr: member1
117         - AbbrCode: 0
118         - AbbrCode: 3
119           Values:
120             - CStr: class2
121         - AbbrCode: 4
122           Values:
123             - Value:  0x0000006c
124             - CStr: member1
125         - AbbrCode: 0
126         - AbbrCode: 3
127           Values:
128             - CStr: class3
129         - AbbrCode: 4
130           Values:
131             - Value:  0x0000006c
132             - CStr: member1
133         - AbbrCode: 0
134         - AbbrCode: 8
135           Values:
136             - CStr: int
137         - AbbrCode: 2
138           Values:
139             - CStr: foo1
140             - Value:  0x1000
141             - Value:  0x10
142             - Value:  0x0000002a
143         - AbbrCode: 2
144           Values:
145             - CStr: foo2
146             - Value:  0x0
147             - Value:  0x100
148             - Value:  0x00000040
149         - AbbrCode: 0