Follow up to d0858bffa11, add missing REQUIRES x86
[llvm-project.git] / llvm / test / tools / dsymutil / X86 / basic-lto-dw4-linking-x86.test
blob3c454e5d3d022459b0c7ca963836b804814768e3
1 RUN: dsymutil -f -o - -oso-prepend-path=%p/.. %p/../Inputs/basic-lto-dw4.macho.x86_64 | llvm-dwarfdump -a - | FileCheck %s
3 RUN: dsymutil --linker llvm -f -o - -oso-prepend-path=%p/.. \
4 RUN:   %p/../Inputs/basic-lto-dw4.macho.x86_64 | llvm-dwarfdump -a - \
5 RUN:   | FileCheck %s
7 CHECK: file format Mach-O 64-bit x86-64
9 CHECK: debug_info contents
11 CHECK:  Compile Unit: {{.*}} version = 0x0004
12 CHECK:  DW_TAG_compile_unit
13 CHECK:    DW_AT_producer ("clang version 3.7.0 ")
14 CHECK:    DW_AT_language (DW_LANG_C99)
15 CHECK:    DW_AT_name ("basic1.c")
16 CHECK:    DW_AT_stmt_list (0x00000000)
17 CHECK:    DW_AT_comp_dir ("/Inputs")
18 CHECK:    DW_AT_low_pc (0x0000000100000f40)
19 CHECK:    DW_AT_high_pc (0x0000000100000f4b)
20 CHECK:    DW_TAG_subprogram
21 CHECK:      DW_AT_low_pc (0x0000000100000f40)
22 CHECK:      DW_AT_high_pc (0x0000000100000f4b)
23 CHECK:      DW_AT_frame_base (DW_OP_reg6 RBP)
24 CHECK:      DW_AT_name ("main")
25 CHECK:      DW_AT_decl_file ("/Inputs{{[/\\]}}basic1.c")
26 CHECK:      DW_AT_prototyped (true)
27 CHECK:      DW_AT_type (0x00000000000000a1
28 CHECK:      DW_AT_external (true)
29 CHECK:      DW_TAG_formal_parameter
30 CHECK:        DW_AT_location (DW_OP_reg5 RDI, DW_OP_piece 0x4)
31 CHECK:        DW_AT_name ("argc")
32 CHECK:        DW_AT_decl_file ("/Inputs{{[/\\]}}basic1.c")
33 CHECK:        DW_AT_type (0x00000000000000a1
34 CHECK:      DW_TAG_formal_parameter
35 CHECK:        DW_AT_location (DW_OP_reg4 RSI)
36 CHECK:        DW_AT_name ("argv")
37 CHECK:        DW_AT_type (0x00000060
38 CHECK:      NULL
39 CHECK:    DW_TAG_pointer_type
40 CHECK:       DW_AT_type (0x00000065
41 CHECK:    DW_TAG_pointer_type
42 CHECK:    DW_TAG_const_type
43 CHECK:    DW_TAG_base_type
44 CHECK:      DW_AT_name ("char")
45 CHECK:      DW_AT_encoding (DW_ATE_signed_char)
46 CHECK:      DW_AT_byte_size (0x01)
47 CHECK:    NULL
49 CHECK:  Compile Unit:{{.*}} version = 0x0004
51 CHECK:  DW_TAG_compile_unit
52 CHECK:    DW_AT_producer ("clang version 3.7.0 ")
53 CHECK:    DW_AT_language (DW_LANG_C99)
54 CHECK:    DW_AT_name ("basic2.c")
55 CHECK:    DW_AT_stmt_list (0x00000044)
56 CHECK:    DW_AT_low_pc (0x0000000100000f50)
57 CHECK:    DW_AT_high_pc (0x0000000100000f87)
58 CHECK:    DW_TAG_base_type
59 CHECK:      DW_AT_name ("int")
60 CHECK:    DW_TAG_variable
61 CHECK:      DW_AT_name ("baz")
62 CHECK:      DW_AT_location (DW_OP_addr 0x100001000)
63 CHECK:    DW_TAG_variable
64 CHECK:      DW_AT_name ("private_int")
65 CHECK:      DW_AT_decl_file ("/Inputs{{[/\\]}}basic2.c")
66 CHECK:      DW_AT_location (DW_OP_addr 0x100001008)
67 CHECK:    DW_TAG_subprogram
68 CHECK:      DW_AT_name ("inc")
69 CHECK:      DW_AT_type (0x000000a1
70 CHECK:      DW_AT_inline (DW_INL_inlined)
71 CHECK:    DW_TAG_subprogram
72 CHECK:      DW_AT_low_pc (0x0000000100000f50)
73 CHECK:      DW_AT_high_pc (0x0000000100000f87)
74 CHECK:      DW_AT_frame_base (DW_OP_reg6 RBP)
75 CHECK:      DW_AT_name ("foo")
76 CHECK:      DW_AT_decl_file ("/Inputs{{[/\\]}}basic2.c")
77 CHECK:      DW_AT_prototyped (true)
78 CHECK:      DW_AT_type (0x000000a1
79 CHECK:      DW_TAG_formal_parameter
80 CHECK:        DW_AT_location (0x00000000
81 CHECK:          [0x0000000100000f50, 0x0000000100000f5c): DW_OP_reg5 RDI, DW_OP_piece 0x4)
82 CHECK:        DW_AT_name ("arg")
83 CHECK:        DW_AT_type (0x000000a1
84 CHECK:      DW_TAG_inlined_subroutine
85 CHECK:        DW_AT_abstract_origin (0x000000d2 "inc")
86 CHECK:        DW_AT_low_pc (0x0000000100000f61)
87 CHECK:        DW_AT_high_pc (0x0000000100000f70)
88 CHECK:      NULL
89 CHECK:    NULL
91 CHECK:  Compile Unit: {{.*}} version = 0x0004
93 CHECK:  DW_TAG_compile_unit
94 CHECK:    DW_AT_producer ("clang version 3.7.0 ")
95 CHECK:    DW_AT_name ("basic3.c")
96 CHECK:    DW_AT_stmt_list (0x0000009a)
97 CHECK:    DW_AT_low_pc (0x0000000100000f90)
98 CHECK:    DW_AT_high_pc (0x0000000100000fb4)
99 CHECK:    DW_TAG_variable
100 CHECK:      DW_AT_name ("val")
101 CHECK:      DW_AT_decl_file ("/Inputs{{[/\\]}}basic3.c")
102 CHECK:      DW_AT_location (DW_OP_addr 0x100001004)
103 CHECK:    DW_TAG_volatile_type
104 CHECK:    DW_TAG_subprogram
105 CHECK:      DW_AT_name ("inc")
106 CHECK:      DW_AT_inline (DW_INL_inlined)
107 CHECK:    DW_TAG_subprogram
108 CHECK:      DW_AT_low_pc (0x0000000100000f90)
109 CHECK:      DW_AT_high_pc (0x0000000100000fb4)
110 CHECK:      DW_AT_frame_base (DW_OP_reg6 RBP)
111 CHECK:      DW_AT_name ("bar")
112 CHECK:      DW_TAG_formal_parameter
113 CHECK:        DW_AT_location (0x00000025
114 CHECK:          [0x0000000100000f90, 0x0000000100000f9f): DW_OP_reg5 RDI, DW_OP_piece 0x4
115 CHECK:          [0x0000000100000fa9, 0x0000000100000fad): DW_OP_reg5 RDI, DW_OP_piece 0x4)
116 CHECK:        DW_AT_name ("arg")
117 CHECK:      DW_TAG_inlined_subroutine
118 CHECK:        DW_AT_abstract_origin (0x0000015f "inc")
119 CHECK:        DW_AT_ranges (0x00000000
120 CHECK:           [0x0000000100000f94, 0x0000000100000f9a)
121 CHECK:           [0x0000000100000f9f, 0x0000000100000fa7))
123 CHECK:      NULL
124 CHECK:    NULL
127 CHECK: .debug_loc contents:
128 CHECK-NEXT: 0x00000000:
129 CHECK-NEXT:              (0x0000000000000000, 0x000000000000000c): DW_OP_reg5 RDI, DW_OP_piece 0x4
130 CHECK-NOT: :
131 CHECK:      0x00000025:
132 CHECK-NEXT:              (0x0000000000000000, 0x000000000000000f): DW_OP_reg5 RDI, DW_OP_piece 0x4
133 CHECK-NEXT:              (0x0000000000000019, 0x000000000000001d): DW_OP_reg5 RDI, DW_OP_piece 0x4
136 CHECK: .debug_aranges contents:
137 CHECK-NEXT: Address Range Header: length = 0x0000002c, format = DWARF32, version = 0x0002, cu_offset = 0x00000000, addr_size = 0x08, seg_size = 0x00
138 CHECK-NEXT: [0x0000000100000f40,  0x0000000100000f4b)
139 CHECK-NEXT: Address Range Header: length = 0x0000002c, format = DWARF32, version = 0x0002, cu_offset = 0x00000077, addr_size = 0x08, seg_size = 0x00
140 CHECK-NEXT: [0x0000000100000f50, 0x0000000100000f87)
141 CHECK-NEXT: Address Range Header: length = 0x0000002c, format = DWARF32, version = 0x0002, cu_offset = 0x0000011b, addr_size = 0x08, seg_size = 0x00
142 CHECK-NEXT: [0x0000000100000f90, 0x0000000100000fb4)
144 CHECK: .debug_line contents:
145 CHECK: file_names[  1]:
146 CHECK-NEXT: name: "basic1.c"
147 CHECK-NEXT: dir_index: 0
148 CHECK: Address            Line   Column File   ISA Discriminator OpIndex Flags
149 CHECK-NEXT: ------------------ ------ ------ ------ --- ------------- ------- -------------
150 CHECK-NEXT: 0x0000000100000f40     26      0      1   0             0       0  is_stmt
151 CHECK-NEXT: 0x0000000100000f44     27     10      1   0             0       0  is_stmt prologue_end
152 CHECK-NEXT: 0x0000000100000f49     27      3      1   0             0       0
153 CHECK-NEXT: 0x0000000100000f4b     27      3      1   0             0       0  end_sequence
155 CHECK: file_names[  1]:
156 CHECK-NEXT: name: "basic2.c"
157 CHECK-NEXT: dir_index: 0
158 CHECK: Address            Line   Column File   ISA Discriminator OpIndex Flags
159 CHECK-NEXT: ------------------ ------ ------ ------ --- ------------- ------- -------------
160 CHECK-NEXT: 0x0000000100000f50     19      0      1   0             0       0  is_stmt
161 CHECK-NEXT: 0x0000000100000f54     20     18      1   0             0       0  is_stmt prologue_end
162 CHECK-NEXT: 0x0000000100000f5a     20     17      1   0             0       0
163 CHECK-NEXT: 0x0000000100000f5c     20     10      1   0             0       0
164 CHECK-NEXT: 0x0000000100000f61     15     10      1   0             0       0  is_stmt
165 CHECK-NEXT: 0x0000000100000f70     20     23      1   0             0       0  is_stmt
166 CHECK-NEXT: 0x0000000100000f74     20     36      1   0             0       0
167 CHECK-NEXT: 0x0000000100000f83     20     31      1   0             0       0
168 CHECK-NEXT: 0x0000000100000f85     20      3      1   0             0       0
169 CHECK-NEXT: 0x0000000100000f87     20      3      1   0             0       0  end_sequence
171 CHECK: file_names[  1]:
172 CHECK-NEXT: name: "basic3.c"
173 CHECK-NEXT: dir_index: 0
174 CHECK: Address            Line   Column File   ISA Discriminator OpIndex Flags
175 CHECK-NEXT: ------------------ ------ ------ ------ --- ------------- ------- -------------
176 CHECK-NEXT: 0x0000000100000f90     16      0      1   0             0       0  is_stmt
177 CHECK-NEXT: 0x0000000100000f94     12     10      1   0             0       0  is_stmt prologue_end
178 CHECK-NEXT: 0x0000000100000f9a     17      7      1   0             0       0  is_stmt
179 CHECK-NEXT: 0x0000000100000f9f     12     10      1   0             0       0  is_stmt
180 CHECK-NEXT: 0x0000000100000fa7     20      1      1   0             0       0  is_stmt
181 CHECK-NEXT: 0x0000000100000fa9     19     18      1   0             0       0  is_stmt
182 CHECK-NEXT: 0x0000000100000fab     19     10      1   0             0       0
183 CHECK-NEXT: 0x0000000100000fb2     20      1      1   0             0       0  is_stmt
184 CHECK-NEXT: 0x0000000100000fb4     20      1      1   0             0       0  is_stmt end_sequence
186 CHECK-NOT: .debug_pubnames contents:
187 CHECK-NOT: .debug_pubtypes contents:
189 CHECK: .apple_names contents:
190 CHECK-NEXT: Header {
191 CHECK-NEXT:   Magic: 0x48415348
192 CHECK-NEXT:   Version: 0x1
193 CHECK-NEXT:   Hash function: 0x0
194 CHECK-NEXT:   Bucket count: 7
195 CHECK-NEXT:   Hashes count: 7
196 CHECK-NEXT:   HeaderData length: 12
197 CHECK-NEXT: }
198 CHECK-NEXT: DIE offset base: 0
199 CHECK-NEXT: Number of atoms: 1
200 CHECK-NEXT: Size of each hash data entry: 4
201 CHECK-NEXT: Atoms [
202 CHECK-NEXT:   Atom 0 {
203 CHECK-NEXT:     Type: DW_ATOM_die_offset
204 CHECK-NEXT:     Form: DW_FORM_data4
205 CHECK-NEXT:   }
206 CHECK-NEXT: ]
207 CHECK-NEXT: Bucket 0 [
208 CHECK-NEXT:   Hash 0xb8860c2 [
209 CHECK-NEXT:     Name@0x74 {
210 CHECK-NEXT:       String: 0x00000048 "baz"
211 CHECK-NEXT:       Data 0 [
212 CHECK-NEXT:         Atom[0]: 0x000000a8
213 CHECK-NEXT:       ]
214 CHECK-NEXT:     }
215 CHECK-NEXT:   ]
216 CHECK-NEXT:   Hash 0xb88801f [
217 CHECK-NEXT:     Name@0x84 {
218 CHECK-NEXT:       String: 0x00000058 "inc"
219 CHECK-NEXT:       Data 0 [
220 CHECK-NEXT:         Atom[0]: 0x00000106
221 CHECK-NEXT:       ]
222 CHECK-NEXT:       Data 1 [
223 CHECK-NEXT:         Atom[0]: 0x00000193
224 CHECK-NEXT:       ]
225 CHECK-NEXT:     }
226 CHECK-NEXT:   ]
227 CHECK-NEXT: ]
228 CHECK-NEXT: Bucket 1 [
229 CHECK-NEXT:   EMPTY
230 CHECK-NEXT: ]
231 CHECK-NEXT: Bucket 2 [
232 CHECK-NEXT:   Hash 0xfed12c6a [
233 CHECK-NEXT:     Name@0x98 {
234 CHECK-NEXT:       String: 0x0000004c "private_int"
235 CHECK-NEXT:       Data 0 [
236 CHECK-NEXT:         Atom[0]: 0x000000bd
237 CHECK-NEXT:       ]
238 CHECK-NEXT:     }
239 CHECK-NEXT:   ]
240 CHECK-NEXT: ]
241 CHECK-NEXT: Bucket 3 [
242 CHECK-NEXT:   Hash 0xb88b5c8 [
243 CHECK-NEXT:     Name@0xa8 {
244 CHECK-NEXT:       String: 0x0000006d "val"
245 CHECK-NEXT:       Data 0 [
246 CHECK-NEXT:         Atom[0]: 0x00000145
247 CHECK-NEXT:       ]
248 CHECK-NEXT:     }
249 CHECK-NEXT:   ]
250 CHECK-NEXT:   Hash 0x7c9a7f6a [
251 CHECK-NEXT:     Name@0xb8 {
252 CHECK-NEXT:       String: 0x00000027 "main"
253 CHECK-NEXT:       Data 0 [
254 CHECK-NEXT:         Atom[0]: 0x0000002a
255 CHECK-NEXT:       ]
256 CHECK-NEXT:     }
257 CHECK-NEXT:   ]
258 CHECK-NEXT: ]
259 CHECK-NEXT: Bucket 4 [
260 CHECK-NEXT:   EMPTY
261 CHECK-NEXT: ]
262 CHECK-NEXT: Bucket 5 [
263 CHECK-NEXT:   Hash 0xb887389 [
264 CHECK-NEXT:     Name@0xc8 {
265 CHECK-NEXT:       String: 0x0000005c "foo"
266 CHECK-NEXT:       Data 0 [
267 CHECK-NEXT:         Atom[0]: 0x000000de
268 CHECK-NEXT:       ]
269 CHECK-NEXT:     }
270 CHECK-NEXT:   ]
271 CHECK-NEXT: ]
272 CHECK-NEXT: Bucket 6 [
273 CHECK-NEXT:   Hash 0xb8860ba [
274 CHECK-NEXT:     Name@0xd8 {
275 CHECK-NEXT:       String: 0x00000071 "bar"
276 CHECK-NEXT:       Data 0 [
277 CHECK-NEXT:         Atom[0]: 0x0000016b
278 CHECK-NEXT:       ]
279 CHECK-NEXT:     }
280 CHECK-NEXT:   ]
281 CHECK-NEXT: ]
283 CHECK: .apple_types contents:
284 CHECK-NEXT: Header {
285 CHECK-NEXT:   Magic: 0x48415348
286 CHECK-NEXT:   Version: 0x1
287 CHECK-NEXT:   Hash function: 0x0
288 CHECK-NEXT:   Bucket count: 2
289 CHECK-NEXT:   Hashes count: 2
290 CHECK-NEXT:   HeaderData length: 24
291 CHECK-NEXT: }
292 CHECK-NEXT: DIE offset base: 0
293 CHECK-NEXT: Number of atoms: 4
294 CHECK-NEXT: Size of each hash data entry: 11
295 CHECK-NEXT: Atoms [
296 CHECK-NEXT:   Atom 0 {
297 CHECK-NEXT:     Type: DW_ATOM_die_offset
298 CHECK-NEXT:     Form: DW_FORM_data4
299 CHECK-NEXT:   }
300 CHECK-NEXT:   Atom 1 {
301 CHECK-NEXT:     Type: DW_ATOM_die_tag
302 CHECK-NEXT:     Form: DW_FORM_data2
303 CHECK-NEXT:   }
304 CHECK-NEXT:   Atom 2 {
305 CHECK-NEXT:     Type: DW_ATOM_type_flags
306 CHECK-NEXT:     Form: DW_FORM_data1
307 CHECK-NEXT:   }
308 CHECK-NEXT:   Atom 3 {
309 CHECK-NEXT:     Type: DW_ATOM_qual_name_hash
310 CHECK-NEXT:     Form: DW_FORM_data4
311 CHECK-NEXT:   }
312 CHECK-NEXT: ]
313 CHECK-NEXT: Bucket 0 [
314 CHECK-NEXT:   Hash 0xb888030 [
315 CHECK-NEXT:     Name@0x44 {
316 CHECK-NEXT:       String: 0x00000044 "int"
317 CHECK-NEXT:       Data 0 [
318 CHECK-NEXT:         Atom[0]: 0x000000a1
319 CHECK-NEXT:         Atom[1]: 0x0024 (DW_TAG_base_type)
320 CHECK-NEXT:         Atom[2]: 0x00
321 CHECK-NEXT:         Atom[3]: 0x0c3a28a4
322 CHECK-NEXT:       ]
323 CHECK-NEXT:     }
324 CHECK-NEXT:   ]
325 CHECK-NEXT: ]
326 CHECK-NEXT: Bucket 1 [
327 CHECK-NEXT:   Hash 0x7c952063 [
328 CHECK-NEXT:     Name@0x5b {
329 CHECK-NEXT:       String: 0x00000036 "char"
330 CHECK-NEXT:       Data 0 [
331 CHECK-NEXT:         Atom[0]: 0x0000006f
332 CHECK-NEXT:         Atom[1]: 0x0024 (DW_TAG_base_type)
333 CHECK-NEXT:         Atom[2]: 0x00
334 CHECK-NEXT:         Atom[3]: 0x937bd757
335 CHECK-NEXT:       ]
336 CHECK-NEXT:     }
337 CHECK-NEXT:   ]
338 CHECK-NEXT: ]
340 CHECK: .apple_namespaces contents:
341 CHECK-NEXT: Header {
342 CHECK-NEXT:   Magic: 0x48415348
343 CHECK-NEXT:   Version: 0x1
344 CHECK-NEXT:   Hash function: 0x0
345 CHECK-NEXT:   Bucket count: 1
346 CHECK-NEXT:   Hashes count: 0
347 CHECK-NEXT:   HeaderData length: 12
348 CHECK-NEXT: }
349 CHECK-NEXT: DIE offset base: 0
350 CHECK-NEXT: Number of atoms: 1
351 CHECK-NEXT: Size of each hash data entry: 4
352 CHECK-NEXT: Atoms [
353 CHECK-NEXT:   Atom 0 {
354 CHECK-NEXT:     Type: DW_ATOM_die_offset
355 CHECK-NEXT:     Form: DW_FORM_data4
356 CHECK-NEXT:   }
357 CHECK-NEXT: ]
358 CHECK-NEXT: Bucket 0 [
359 CHECK-NEXT:   EMPTY
360 CHECK-NEXT: ]
362 CHECK: .apple_objc contents:
363 CHECK-NEXT: Header {
364 CHECK-NEXT:   Magic: 0x48415348
365 CHECK-NEXT:   Version: 0x1
366 CHECK-NEXT:   Hash function: 0x0
367 CHECK-NEXT:   Bucket count: 1
368 CHECK-NEXT:   Hashes count: 0
369 CHECK-NEXT:   HeaderData length: 12
370 CHECK-NEXT: }
371 CHECK-NEXT: DIE offset base: 0
372 CHECK-NEXT: Number of atoms: 1
373 CHECK-NEXT: Size of each hash data entry: 4
374 CHECK-NEXT: Atoms [
375 CHECK-NEXT:   Atom 0 {
376 CHECK-NEXT:     Type: DW_ATOM_die_offset
377 CHECK-NEXT:     Form: DW_FORM_data4
378 CHECK-NEXT:   }
379 CHECK-NEXT: ]
380 CHECK-NEXT: Bucket 0 [
381 CHECK-NEXT:   EMPTY
382 CHECK-NEXT: ]