[ARM] Rewrite how VCMP are lowered, using a single node
[llvm-core.git] / test / tools / dsymutil / X86 / basic-lto-linking-x86.test
blobf0a80019ae08d746ea79ad40a6ecaeb0c56744de
1 RUN: dsymutil -f -o - -oso-prepend-path=%p/.. %p/../Inputs/basic-lto.macho.x86_64 | llvm-dwarfdump -a - | FileCheck %s
2 RUN: dsymutil -oso-prepend-path=%p/.. -dump-debug-map %p/../Inputs/basic-lto.macho.x86_64 | dsymutil -f -o - -y - | llvm-dwarfdump -a - | FileCheck %s
4 CHECK: file format Mach-O 64-bit x86-64
6 CHECK: debug_info contents
8 CHECK:  Compile Unit:
10 CHECK:  DW_TAG_compile_unit
11 CHECK:    DW_AT_producer ("Apple LLVM version 6.0 (clang-600.0.39) (based on LLVM 3.5svn)")
12 CHECK:    DW_AT_language (DW_LANG_C99)
13 CHECK:    DW_AT_name ("basic1.c")
14 CHECK:    DW_AT_stmt_list (0x00000000)
15 CHECK:    DW_AT_comp_dir ("/Inputs")
16 CHECK:    DW_AT_low_pc (0x0000000100000f40)
17 CHECK:    DW_TAG_subprogram
18 CHECK:      DW_AT_name ("main")
19 CHECK:      DW_AT_decl_file ("/Inputs{{[/\\]}}basic1.c")
20 CHECK:      DW_AT_decl_line (23)
21 CHECK:      DW_AT_prototyped (0x01)
22 CHECK:      DW_AT_type (0x00000063
23 CHECK:      DW_AT_external (0x01)
24 CHECK:      DW_AT_accessibility (DW_ACCESS_public)
25 CHECK:      DW_AT_low_pc (0x0000000100000f40)
26 CHECK:      DW_AT_high_pc (0x0000000100000f4b)
27 CHECK:      DW_AT_frame_base (DW_OP_reg6 RBP)
28 CHECK:      DW_TAG_formal_parameter
29 CHECK:        DW_AT_name ("argc")
30 CHECK:        DW_AT_type (0x00000063
31 CHECK:        DW_AT_location (DW_OP_reg5 RDI, DW_OP_piece 0x4)
32 CHECK:      DW_TAG_formal_parameter
33 CHECK:        DW_AT_name ("argv")
34 CHECK:        DW_AT_type (0x0000006a
35 CHECK:        DW_AT_location (DW_OP_reg4 RSI)
36 CHECK:      NULL
37 CHECK:    DW_TAG_base_type
38 CHECK:      DW_AT_name ("int")
39 CHECK:      DW_AT_encoding (DW_ATE_signed)
40 CHECK:      DW_AT_byte_size (0x04)
41 CHECK:    DW_TAG_pointer_type
42 CHECK:      DW_AT_type (0x0000006f
43 CHECK:    DW_TAG_pointer_type
44 CHECK:      DW_AT_type (0x00000074
45 CHECK:    DW_TAG_const_type
46 CHECK:      DW_AT_type (0x00000079
47 CHECK:    DW_TAG_base_type
48 CHECK:      DW_AT_name ("char")
49 CHECK:      DW_AT_encoding (DW_ATE_signed_char)
50 CHECK:      DW_AT_byte_size (0x01)
51 CHECK:    NULL
53 CHECK:  Compile Unit:
55 CHECK:  DW_TAG_compile_unit
56 CHECK:    DW_AT_producer ("Apple LLVM version 6.0 (clang-600.0.39) (based on LLVM 3.5svn)")
57 CHECK:    DW_AT_name ("basic2.c")
58 CHECK:    DW_AT_stmt_list (0x0000003e)
59 CHECK:    DW_AT_comp_dir ("/Inputs")
60 CHECK:   DW_AT_low_pc (0x0000000100000f50)
61 CHECK:    DW_TAG_variable
62 CHECK:      DW_AT_name ("private_int")
63 CHECK:      DW_AT_type (0x0000000000000063
64 CHECK:      DW_AT_decl_file ("/Inputs{{[/\\]}}basic2.c")
65 CHECK:      DW_AT_location (DW_OP_addr 0x100001008)
66 CHECK:    DW_TAG_variable
67 CHECK:      DW_AT_name ("baz")
68 CHECK:      DW_AT_type (0x0000000000000063
69 CHECK:      DW_AT_location (DW_OP_addr 0x100001000)
70 CHECK:    DW_TAG_subprogram
71 CHECK:      DW_AT_name ("foo")
72 CHECK:      DW_AT_type (0x0000000000000063
73 CHECK:      DW_AT_low_pc (0x0000000100000f50)
74 CHECK:      DW_AT_high_pc (0x0000000100000f89)
75 CHECK:      DW_AT_frame_base (DW_OP_reg6 RBP)
76 CHECK:      DW_TAG_formal_parameter
77 CHECK:        DW_AT_name ("arg")
78 CHECK:        DW_AT_type (0x0000000000000063
79 CHECK:        DW_AT_location (0x00000000
80 CHECK:          [0x0000000100000f50, 0x0000000100000f5e): DW_OP_reg5 RDI, DW_OP_piece 0x4)
81 CHECK:[[INC1:0x[0-9a-f]*]]{{.*}}DW_TAG_inlined_subroutine
82 CHECK:        DW_AT_abstract_origin (0x00000128 "inc")
83 CHECK:        DW_AT_low_pc (0x0000000100000f63)
84 CHECK:        DW_AT_high_pc (0x0000000100000f72)
85 CHECK:        DW_AT_call_line (20)
86 CHECK:      NULL
87 CHECK:    DW_TAG_subprogram
88 CHECK:      DW_AT_name ("inc")
89 CHECK:      DW_AT_type (0x0000000000000063
90 CHECK:      DW_AT_inline (DW_INL_inlined)
91 CHECK:    NULL
93 CHECK:  Compile Unit:
95 CHECK:  DW_TAG_compile_unit
96 CHECK:    DW_AT_producer ("Apple LLVM version 6.0 (clang-600.0.39) (based on LLVM 3.5svn)")
97 CHECK:    DW_AT_name ("basic3.c")
98 CHECK:    DW_AT_stmt_list (0x0000007e)
99 CHECK:    DW_AT_comp_dir ("/Inputs")
100 CHECK:    DW_AT_low_pc (0x0000000100000f90)
101 CHECK:    DW_TAG_variable
102 CHECK:      DW_AT_name ("val")
103 CHECK:      DW_AT_type (0x00000176
104 CHECK:      DW_AT_decl_file ("/Inputs{{[/\\]}}basic3.c")
105 CHECK:      DW_AT_location (DW_OP_addr 0x100001004)
106 CHECK:    DW_TAG_volatile_type
107 CHECK:      DW_AT_type (0x0000000000000063
108 CHECK:    DW_TAG_subprogram
109 CHECK:      DW_AT_name ("bar")
110 CHECK:      DW_AT_type (0x0000000000000063
111 CHECK:      DW_AT_low_pc (0x0000000100000f90)
112 CHECK:      DW_AT_high_pc (0x0000000100000fb4)
113 CHECK:      DW_AT_frame_base (DW_OP_reg6 RBP)
114 CHECK:      DW_TAG_formal_parameter
115 CHECK:        DW_AT_name ("arg")
116 CHECK:        DW_AT_type (0x0000000000000063
117 CHECK:        DW_AT_location (0x00000025
118 CHECK:          [0x0000000100000f90, 0x0000000100000f9f): DW_OP_reg5 RDI, DW_OP_piece 0x4
119 CHECK:          [0x0000000100000fa9, 0x0000000100000fad): DW_OP_reg5 RDI, DW_OP_piece 0x4)
120 CHECK:      DW_TAG_lexical_block
121 CHECK:        DW_AT_low_pc (0x0000000100000f94)
122 CHECK:        DW_AT_high_pc (0x0000000100000fa7)
123 CHECK:[[INC2:0x[0-9a-f]*]]{{.*}}DW_TAG_inlined_subroutine
124 CHECK:          DW_AT_abstract_origin (0x000001d4 "inc")
125 CHECK:          DW_AT_ranges (0x00000000
126 CHECK:             [0x0000000100000f94, 0x0000000100000f9a)
127 CHECK:             [0x0000000100000f9f, 0x0000000100000fa7))
128 CHECK:        NULL
129 CHECK:      NULL
130 CHECK:    DW_TAG_subprogram
131 CHECK:      DW_AT_name ("inc")
132 CHECK:      DW_AT_type (0x0000000000000063
133 CHECK:    NULL
135 CHECK: .debug_loc contents:
136 CHECK-NEXT: 0x00000000:
137 CHECK-NEXT:              [0x0000000000000000, 0x000000000000000e): DW_OP_reg5 RDI, DW_OP_piece 0x4
138 CHECK-NOT: :
139 CHECK:      0x00000025:
140 CHECK-NEXT:              [0x0000000000000000, 0x000000000000000f): DW_OP_reg5 RDI, DW_OP_piece 0x4
141 CHECK-NEXT:              [0x0000000000000019, 0x000000000000001d): DW_OP_reg5 RDI, DW_OP_piece 0x4
143 CHECK: .debug_aranges contents:
144 CHECK-NEXT: Address Range Header: length = 0x0000002c, version = 0x0002, cu_offset = 0x00000000, addr_size = 0x08, seg_size = 0x00
145 CHECK-NEXT: [0x0000000100000f40, 0x0000000100000f4b)
146 CHECK-NEXT: Address Range Header: length = 0x0000002c, version = 0x0002, cu_offset = 0x00000081, addr_size = 0x08, seg_size = 0x00
147 CHECK-NEXT: [0x0000000100000f50, 0x0000000100000f89)
148 CHECK-NEXT: Address Range Header: length = 0x0000002c, version = 0x0002, cu_offset = 0x0000013a, addr_size = 0x08, seg_size = 0x00
149 CHECK-NEXT: [0x0000000100000f90, 0x0000000100000fb4)
152 CHECK: .debug_line contents
153 CHECK: file_names[  1]:
154 CHECK-NEXT: name: "basic1.c"
155 CHECK-NEXT: dir_index: 0
156 CHECK: 0x0000000100000f40     23      0      1   0             0  is_stmt
157 CHECK: 0x0000000100000f44     24      0      1   0             0  is_stmt prologue_end
158 CHECK: 0x0000000100000f4b     24      0      1   0             0  is_stmt end_sequence
160 CHECK: file_names[  1]:
161 CHECK-NEXT: name: "basic2.c"
162 CHECK-NEXT: dir_index: 0
163 CHECK: 0x0000000100000f50     19      0      1   0             0  is_stmt
164 CHECK: 0x0000000100000f54     20      0      1   0             0  is_stmt prologue_end
165 CHECK: 0x0000000100000f63     15      0      1   0             0  is_stmt
166 CHECK: 0x0000000100000f72     20      0      1   0             0  is_stmt
167 CHECK: 0x0000000100000f89     20      0      1   0             0  is_stmt end_sequence
169 CHECK: file_names[  1]:
170 CHECK-NEXT: name: "basic3.c"
171 CHECK-NEXT: dir_index: 0
172 CHECK: 0x0000000100000f90     16      0      1   0             0  is_stmt
173 CHECK: 0x0000000100000f94     12      0      1   0             0  is_stmt prologue_end
174 CHECK: 0x0000000100000f9a     17      0      1   0             0  is_stmt
175 CHECK: 0x0000000100000f9f     12      0      1   0             0  is_stmt
176 CHECK: 0x0000000100000fa7     20      0      1   0             0  is_stmt
177 CHECK: 0x0000000100000fa9     19      0      1   0             0  is_stmt
178 CHECK: 0x0000000100000fb2     20      0      1   0             0  is_stmt
179 CHECK: 0x0000000100000fb4     20      0      1   0             0  is_stmt end_sequence
181 CHECK: .debug_pubnames contents:
182 CHECK-NEXT: length = 0x00000017 version = 0x0002 unit_offset = 0x00000000 unit_size = 0x00000081
183 CHECK-NEXT: Offset     Name
184 CHECK-NEXT: 0x00000026 "main"
185 CHECK-NEXT: length = 0x0000002e version = 0x0002 unit_offset = 0x00000081 unit_size = 0x000000b9
186 CHECK-NEXT: Offset     Name
187 CHECK-NEXT: 0x00000026 "private_int"
188 CHECK-NEXT: 0x0000003f "baz"
189 CHECK-NEXT: 0x00000058 "foo"
190 CHECK-NEXT: length = 0x0000001e version = 0x0002 unit_offset = 0x0000013a unit_size = 0x000000ac
191 CHECK-NEXT: Offset     Name
192 CHECK-NEXT: 0x00000026 "val"
193 CHECK-NEXT: 0x00000045 "bar"
195 CHECK: .debug_pubtypes contents:
196 CHECK-NEXT: length = 0x0000001f version = 0x0002 unit_offset = 0x00000000 unit_size = 0x00000081
197 CHECK-NEXT: Offset     Name
198 CHECK-NEXT: 0x00000063 "int"
199 CHECK-NEXT: 0x00000079 "char"
201 CHECK: .apple_names contents:
202 CHECK-NEXT: Header {
203 CHECK-NEXT:   Magic: 0x48415348
204 CHECK-NEXT:   Version: 0x1
205 CHECK-NEXT:   Hash function: 0x0
206 CHECK-NEXT:   Bucket count: 7
207 CHECK-NEXT:   Hashes count: 7
208 CHECK-NEXT:   HeaderData length: 12
209 CHECK-NEXT: }
210 CHECK-NEXT: DIE offset base: 0
211 CHECK-NEXT: Number of atoms: 1
212 CHECK-NEXT: Atoms [
213 CHECK-NEXT:   Atom 0 {
214 CHECK-NEXT:     Type: DW_ATOM_die_offset
215 CHECK-NEXT:     Form: DW_FORM_data4
216 CHECK-NEXT:   }
217 CHECK-NEXT: ]
218 CHECK-NEXT: Bucket 0 [
219 CHECK-NEXT:   Hash 0xb8860c2 [
220 CHECK-NEXT:     Name@0x74 {
221 CHECK-NEXT:       String: 0x0000007e "baz"
222 CHECK-NEXT:       Data 0 [
223 CHECK-NEXT:         Atom[0]: 0x000000c0
224 CHECK-NEXT:       ]
225 CHECK-NEXT:     }
226 CHECK-NEXT:   ]
227 CHECK-NEXT:   Hash 0xb88801f [
228 CHECK-NEXT:     Name@0x84 {
229 CHECK-NEXT:       String: 0x0000008a "inc"
230 CHECK-NEXT:       Data 0 [
231 CHECK-NEXT:         Atom[0]: 0x00000110
232 CHECK-NEXT:       ]
233 CHECK-NEXT:       Data 1 [
234 CHECK-NEXT:         Atom[0]: 0x000001c7
235 CHECK-NEXT:       ]
236 CHECK-NEXT:     }
237 CHECK-NEXT:   ]
238 CHECK-NEXT: ]
239 CHECK-NEXT: Bucket 1 [
240 CHECK-NEXT:   EMPTY
241 CHECK-NEXT: ]
242 CHECK-NEXT: Bucket 2 [
243 CHECK-NEXT:   Hash 0xfed12c6a [
244 CHECK-NEXT:     Name@0x98 {
245 CHECK-NEXT:       String: 0x00000072 "private_int"
246 CHECK-NEXT:       Data 0 [
247 CHECK-NEXT:         Atom[0]: 0x000000a7
248 CHECK-NEXT:       ]
249 CHECK-NEXT:     }
250 CHECK-NEXT:   ]
251 CHECK-NEXT: ]
252 CHECK-NEXT: Bucket 3 [
253 CHECK-NEXT:   Hash 0xb88b5c8 [
254 CHECK-NEXT:     Name@0xa8 {
255 CHECK-NEXT:       String: 0x00000097 "val"
256 CHECK-NEXT:       Data 0 [
257 CHECK-NEXT:         Atom[0]: 0x00000160
258 CHECK-NEXT:       ]
259 CHECK-NEXT:     }
260 CHECK-NEXT:   ]
261 CHECK-NEXT:   Hash 0x7c9a7f6a [
262 CHECK-NEXT:     Name@0xb8 {
263 CHECK-NEXT:       String: 0x00000051 "main"
264 CHECK-NEXT:       Data 0 [
265 CHECK-NEXT:         Atom[0]: 0x00000026
266 CHECK-NEXT:       ]
267 CHECK-NEXT:     }
268 CHECK-NEXT:   ]
269 CHECK-NEXT: ]
270 CHECK-NEXT: Bucket 4 [
271 CHECK-NEXT:   EMPTY
272 CHECK-NEXT: ]
273 CHECK-NEXT: Bucket 5 [
274 CHECK-NEXT:   Hash 0xb887389 [
275 CHECK-NEXT:     Name@0xc8 {
276 CHECK-NEXT:       String: 0x00000082 "foo"
277 CHECK-NEXT:       Data 0 [
278 CHECK-NEXT:         Atom[0]: 0x000000d9
279 CHECK-NEXT:       ]
280 CHECK-NEXT:     }
281 CHECK-NEXT:   ]
282 CHECK-NEXT: ]
283 CHECK-NEXT: Bucket 6 [
284 CHECK-NEXT:   Hash 0xb8860ba [
285 CHECK-NEXT:     Name@0xd8 {
286 CHECK-NEXT:       String: 0x0000009b "bar"
287 CHECK-NEXT:       Data 0 [
288 CHECK-NEXT:         Atom[0]: 0x0000017f
289 CHECK-NEXT:       ]
290 CHECK-NEXT:     }
291 CHECK-NEXT:   ]
292 CHECK-NEXT: ]
294 CHECK: apple_types contents:
295 CHECK-NEXT: Header {
296 CHECK-NEXT:   Magic: 0x48415348
297 CHECK-NEXT:   Version: 0x1
298 CHECK-NEXT:   Hash function: 0x0
299 CHECK-NEXT:   Bucket count: 2
300 CHECK-NEXT:   Hashes count: 2
301 CHECK-NEXT:   HeaderData length: 24
302 CHECK-NEXT: }
303 CHECK-NEXT: DIE offset base: 0
304 CHECK-NEXT: Number of atoms: 4
305 CHECK-NEXT: Atoms [
306 CHECK-NEXT:   Atom 0 {
307 CHECK-NEXT:     Type: DW_ATOM_die_offset
308 CHECK-NEXT:     Form: DW_FORM_data4
309 CHECK-NEXT:   }
310 CHECK-NEXT:   Atom 1 {
311 CHECK-NEXT:     Type: DW_ATOM_die_tag
312 CHECK-NEXT:     Form: DW_FORM_data2
313 CHECK-NEXT:   }
314 CHECK-NEXT:   Atom 2 {
315 CHECK-NEXT:     Type: DW_ATOM_type_flags
316 CHECK-NEXT:     Form: DW_FORM_data1
317 CHECK-NEXT:   }
318 CHECK-NEXT:   Atom 3 {
319 CHECK-NEXT:     Type: DW_ATOM_qual_name_hash
320 CHECK-NEXT:     Form: DW_FORM_data4
321 CHECK-NEXT:   }
322 CHECK-NEXT: ]
323 CHECK-NEXT: Bucket 0 [
324 CHECK-NEXT:   Hash 0xb888030 [
325 CHECK-NEXT:     Name@0x44 {
326 CHECK-NEXT:       String: 0x00000060 "int"
327 CHECK-NEXT:       Data 0 [
328 CHECK-NEXT:         Atom[0]: 0x00000063
329 CHECK-NEXT:         Atom[1]: 0x0024
330 CHECK-NEXT:         Atom[2]: 0x00
331 CHECK-NEXT:         Atom[3]: 0x0c3a28a4
332 CHECK-NEXT:       ]
333 CHECK-NEXT:     }
334 CHECK-NEXT:   ]
335 CHECK-NEXT: ]
336 CHECK-NEXT: Bucket 1 [
337 CHECK-NEXT:   Hash 0x7c952063 [
338 CHECK-NEXT:     Name@0x5b {
339 CHECK-NEXT:       String: 0x00000064 "char"
340 CHECK-NEXT:       Data 0 [
341 CHECK-NEXT:         Atom[0]: 0x00000079
342 CHECK-NEXT:         Atom[1]: 0x0024
343 CHECK-NEXT:         Atom[2]: 0x00
344 CHECK-NEXT:         Atom[3]: 0x937bd757
345 CHECK-NEXT:       ]
346 CHECK-NEXT:     }
347 CHECK-NEXT:   ]
348 CHECK-NEXT: ]
350 CHECK: .apple_namespaces contents:
351 CHECK-NEXT: Header {
352 CHECK-NEXT:   Magic: 0x48415348
353 CHECK-NEXT:   Version: 0x1
354 CHECK-NEXT:   Hash function: 0x0
355 CHECK-NEXT:   Bucket count: 1
356 CHECK-NEXT:   Hashes count: 0
357 CHECK-NEXT:   HeaderData length: 12
358 CHECK-NEXT: }
359 CHECK-NEXT: DIE offset base: 0
360 CHECK-NEXT: Number of atoms: 1
361 CHECK-NEXT: Atoms [
362 CHECK-NEXT:   Atom 0 {
363 CHECK-NEXT:     Type: DW_ATOM_die_offset
364 CHECK-NEXT:     Form: DW_FORM_data4
365 CHECK-NEXT:   }
366 CHECK-NEXT: ]
367 CHECK-NEXT: Bucket 0 [
368 CHECK-NEXT:   EMPTY
369 CHECK-NEXT: ]
371 CHECK: .apple_objc contents:
372 CHECK-NEXT: Header {
373 CHECK-NEXT:   Magic: 0x48415348
374 CHECK-NEXT:   Version: 0x1
375 CHECK-NEXT:   Hash function: 0x0
376 CHECK-NEXT:   Bucket count: 1
377 CHECK-NEXT:   Hashes count: 0
378 CHECK-NEXT:   HeaderData length: 12
379 CHECK-NEXT: }
380 CHECK-NEXT: DIE offset base: 0
381 CHECK-NEXT: Number of atoms: 1
382 CHECK-NEXT: Atoms [
383 CHECK-NEXT:   Atom 0 {
384 CHECK-NEXT:     Type: DW_ATOM_die_offset
385 CHECK-NEXT:     Form: DW_FORM_data4
386 CHECK-NEXT:   }
387 CHECK-NEXT: ]
388 CHECK-NEXT: Bucket 0 [
389 CHECK-NEXT:   EMPTY
390 CHECK-NEXT: ]