[Frontend] Remove unused includes (NFC) (#116927)
[llvm-project.git] / llvm / test / tools / llvm-dwarfutil / ELF / X86 / gc-unit-overlapping-address-ranges.test
blob2e01a853ff5f0e63e4a55cb40813d817d75e7473
1 ## This test checks that overlapping compile unit address ranges
2 ## are ignored (i.e. left unchanged) by --garbage-collection
3 ## optimisation.
5 # RUN: yaml2obj %s -o %t.o
6 # RUN: llvm-dwarfutil --no-odr --garbage-collection %t.o %t1
7 # RUN: llvm-dwarfdump -a %t1 | FileCheck %s
9 # RUN: llvm-dwarfutil --no-odr --linker parallel --garbage-collection %t.o %t1
10 # RUN: llvm-dwarfdump -a %t1 | FileCheck %s
12 # CHECK: DW_TAG_compile_unit
13 # CHECK: DW_AT_name{{.*}}"CU1"
14 # CHECK: DW_TAG_class_type
15 # CHECK: DW_AT_name{{.*}}"class1"
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_TAG_subprogram
21 # CHECK: DW_AT_name{{.*}}"foo2"
22 # CHECK: DW_AT_low_pc{{.*}}0x0000000000001000
23 # CHECK: DW_AT_high_pc{{.*}}0x0000000000001010
24 # CHECK: DW_AT_type{{.*}}"class2"
26 --- !ELF
27 FileHeader:
28   Class:    ELFCLASS64
29   Data:     ELFDATA2LSB
30   Type:     ET_REL
31   Machine:  EM_X86_64
32 Sections:
33   - Name:            .text
34     Type:            SHT_PROGBITS
35     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
36     Address:         0x1000
37     AddressAlign:    0x0000000000000010
38     Content:        "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
39 DWARF:
40   debug_abbrev:
41     - Table:
42       - Tag:      DW_TAG_compile_unit
43         Children: DW_CHILDREN_yes
44         Attributes:
45           - Attribute: DW_AT_producer
46             Form:      DW_FORM_string
47           - Attribute: DW_AT_language
48             Form:      DW_FORM_data2
49           - Attribute: DW_AT_name
50             Form:      DW_FORM_string
51           - Attribute: DW_AT_low_pc
52             Form:      DW_FORM_addr
53           - Attribute: DW_AT_high_pc
54             Form:      DW_FORM_data8
55       - Tag:      DW_TAG_subprogram
56         Children: DW_CHILDREN_no
57         Attributes:
58           - Attribute: DW_AT_name
59             Form:      DW_FORM_string
60           - Attribute: DW_AT_low_pc
61             Form:      DW_FORM_addr
62           - Attribute: DW_AT_high_pc
63             Form:      DW_FORM_data8
64           - Attribute: DW_AT_type
65             Form:      DW_FORM_ref4
66       - Tag:      DW_TAG_class_type
67         Children: DW_CHILDREN_yes
68         Attributes:
69           - Attribute: DW_AT_name
70             Form:      DW_FORM_string
71       - Tag:      DW_TAG_member
72         Children: DW_CHILDREN_no
73         Attributes:
74           - Attribute: DW_AT_type
75             Form:      DW_FORM_ref4
76           - Attribute: DW_AT_name
77             Form:      DW_FORM_string
78       - Tag:      DW_TAG_class_type
79         Children: DW_CHILDREN_no
80         Attributes:
81           - Attribute: DW_AT_name
82             Form:      DW_FORM_string
83           - Attribute: DW_AT_declaration
84             Form:      DW_FORM_flag_present
85       - Tag:      DW_TAG_class_type
86         Children: DW_CHILDREN_yes
87         Attributes:
88           - Attribute: DW_AT_name
89             Form:      DW_FORM_string
90           - Attribute: DW_AT_declaration
91             Form:      DW_FORM_flag_present
92       - Tag:      DW_TAG_template_type_parameter
93         Children: DW_CHILDREN_no
94         Attributes:
95           - Attribute: DW_AT_type
96             Form:      DW_FORM_ref4
97       - Tag:      DW_TAG_base_type
98         Children: DW_CHILDREN_no
99         Attributes:
100           - Attribute: DW_AT_name
101             Form:      DW_FORM_string
102     - Table:
103       - Tag:      DW_TAG_compile_unit
104         Children: DW_CHILDREN_yes
105         Attributes:
106           - Attribute: DW_AT_producer
107             Form:      DW_FORM_string
108           - Attribute: DW_AT_language
109             Form:      DW_FORM_data2
110           - Attribute: DW_AT_name
111             Form:      DW_FORM_string
112           - Attribute: DW_AT_low_pc
113             Form:      DW_FORM_addr
114           - Attribute: DW_AT_high_pc
115             Form:      DW_FORM_data8
116       - Tag:      DW_TAG_subprogram
117         Children: DW_CHILDREN_no
118         Attributes:
119           - Attribute: DW_AT_name
120             Form:      DW_FORM_string
121           - Attribute: DW_AT_low_pc
122             Form:      DW_FORM_addr
123           - Attribute: DW_AT_high_pc
124             Form:      DW_FORM_data8
125           - Attribute: DW_AT_type
126             Form:      DW_FORM_ref4
127       - Tag:      DW_TAG_class_type
128         Children: DW_CHILDREN_yes
129         Attributes:
130           - Attribute: DW_AT_name
131             Form:      DW_FORM_string
132       - Tag:      DW_TAG_member
133         Children: DW_CHILDREN_no
134         Attributes:
135           - Attribute: DW_AT_type
136             Form:      DW_FORM_ref4
137           - Attribute: DW_AT_name
138             Form:      DW_FORM_string
139       - Tag:      DW_TAG_class_type
140         Children: DW_CHILDREN_no
141         Attributes:
142           - Attribute: DW_AT_name
143             Form:      DW_FORM_string
144           - Attribute: DW_AT_declaration
145             Form:      DW_FORM_flag_present
146       - Tag:      DW_TAG_class_type
147         Children: DW_CHILDREN_yes
148         Attributes:
149           - Attribute: DW_AT_name
150             Form:      DW_FORM_string
151           - Attribute: DW_AT_declaration
152             Form:      DW_FORM_flag_present
153       - Tag:      DW_TAG_template_type_parameter
154         Children: DW_CHILDREN_no
155         Attributes:
156           - Attribute: DW_AT_type
157             Form:      DW_FORM_ref4
158       - Tag:      DW_TAG_base_type
159         Children: DW_CHILDREN_no
160         Attributes:
161           - Attribute: DW_AT_name
162             Form:      DW_FORM_string
163   debug_info:
164     - Version: 4
165       Entries:
166         - AbbrCode: 1
167           Values:
168             - CStr: by_hand
169             - Value:  0x04
170             - CStr: CU1
171             - Value:  0x1000
172             - Value:  0x1b
173         - AbbrCode: 3
174           Values:
175             - CStr: class1
176         - AbbrCode: 4
177           Values:
178             - Value:  0x0000006c
179             - CStr: member1
180         - AbbrCode: 0
181         - AbbrCode: 3
182           Values:
183             - CStr: class2
184         - AbbrCode: 4
185           Values:
186             - Value:  0x0000006c
187             - CStr: member1
188         - AbbrCode: 0
189         - AbbrCode: 3
190           Values:
191             - CStr: class3
192         - AbbrCode: 4
193           Values:
194             - Value:  0x0000006c
195             - CStr: member1
196         - AbbrCode: 0
197         - AbbrCode: 8
198           Values:
199             - CStr: int
200         - AbbrCode: 2
201           Values:
202             - CStr: foo1
203             - Value:  0x1000
204             - Value:  0x10
205             - Value:  0x0000002a
206         - AbbrCode: 0
207     - Version: 4
208       Entries:
209         - AbbrCode: 1
210           Values:
211             - CStr: by_hand
212             - Value:  0x04
213             - CStr: CU1
214             - Value:  0x1000
215             - Value:  0x1b
216         - AbbrCode: 3
217           Values:
218             - CStr: class1
219         - AbbrCode: 4
220           Values:
221             - Value:  0x0000006c
222             - CStr: member1
223         - AbbrCode: 0
224         - AbbrCode: 3
225           Values:
226             - CStr: class2
227         - AbbrCode: 4
228           Values:
229             - Value:  0x0000006c
230             - CStr: member1
231         - AbbrCode: 0
232         - AbbrCode: 3
233           Values:
234             - CStr: class3
235         - AbbrCode: 4
236           Values:
237             - Value:  0x0000006c
238             - CStr: member1
239         - AbbrCode: 0
240         - AbbrCode: 8
241           Values:
242             - CStr: int
243         - AbbrCode: 2
244           Values:
245             - CStr: foo2
246             - Value:  0x1000
247             - Value:  0x10
248             - Value:  0x00000040
249         - AbbrCode: 0