[Alignment][NFC] migrate DataLayout internal struct to llvm::Align
[llvm-core.git] / test / ObjectYAML / MachO / DWARF-LittleEndian.yaml
blob1e136e67be13dcfa67cd9586f9ac4bcbaad22308
1 # RUN: yaml2obj %s | obj2yaml | FileCheck %s
3 --- !mach-o
4 IsLittleEndian:  true
5 FileHeader:      
6   magic:           0xFEEDFACF
7   cputype:         0x01000007
8   cpusubtype:      0x00000003
9   filetype:        0x00000001
10   ncmds:           4
11   sizeofcmds:      1392
12   flags:           0x00002000
13   reserved:        0x00000000
14 LoadCommands:    
15   - cmd:             LC_SEGMENT_64
16     cmdsize:         1272
17     segname:         ''
18     vmaddr:          0
19     vmsize:          1086
20     fileoff:         1424
21     filesize:        1086
22     maxprot:         7
23     initprot:        7
24     nsects:          15
25     flags:           0
26     Sections:        
27       - sectname:        __text
28         segname:         __TEXT
29         addr:            0x0000000000000000
30         size:            93
31         offset:          0x00000590
32         align:           4
33         reloff:          0x000009D0
34         nreloc:          3
35         flags:           0x80000400
36         reserved1:       0x00000000
37         reserved2:       0x00000000
38         reserved3:       0x00000000
39       - sectname:        __cstring
40         segname:         __TEXT
41         addr:            0x000000000000005D
42         size:            48
43         offset:          0x000005ED
44         align:           0
45         reloff:          0x00000000
46         nreloc:          0
47         flags:           0x00000002
48         reserved1:       0x00000000
49         reserved2:       0x00000000
50         reserved3:       0x00000000
51       - sectname:        __debug_str
52         segname:         __DWARF
53         addr:            0x000000000000008D
54         size:            182
55         offset:          0x0000061D
56         align:           0
57         reloff:          0x00000000
58         nreloc:          0
59         flags:           0x02000000
60         reserved1:       0x00000000
61         reserved2:       0x00000000
62         reserved3:       0x00000000
63       - sectname:        __debug_loc
64         segname:         __DWARF
65         addr:            0x0000000000000143
66         size:            0
67         offset:          0x000006D3
68         align:           0
69         reloff:          0x00000000
70         nreloc:          0
71         flags:           0x02000000
72         reserved1:       0x00000000
73         reserved2:       0x00000000
74         reserved3:       0x00000000
75       - sectname:        __debug_abbrev
76         segname:         __DWARF
77         addr:            0x0000000000000143
78         size:            104
79         offset:          0x000006D3
80         align:           0
81         reloff:          0x00000000
82         nreloc:          0
83         flags:           0x02000000
84         reserved1:       0x00000000
85         reserved2:       0x00000000
86         reserved3:       0x00000000
87       - sectname:        __debug_info
88         segname:         __DWARF
89         addr:            0x00000000000001AB
90         size:            146
91         offset:          0x0000073B
92         align:           0
93         reloff:          0x000009E8
94         nreloc:          2
95         flags:           0x02000000
96         reserved1:       0x00000000
97         reserved2:       0x00000000
98         reserved3:       0x00000000
99       - sectname:        __debug_ranges
100         segname:         __DWARF
101         addr:            0x000000000000023D
102         size:            0
103         offset:          0x000007CD
104         align:           0
105         reloff:          0x00000000
106         nreloc:          0
107         flags:           0x02000000
108         reserved1:       0x00000000
109         reserved2:       0x00000000
110         reserved3:       0x00000000
111       - sectname:        __debug_macinfo
112         segname:         __DWARF
113         addr:            0x000000000000023D
114         size:            1
115         offset:          0x000007CD
116         align:           0
117         reloff:          0x00000000
118         nreloc:          0
119         flags:           0x02000000
120         reserved1:       0x00000000
121         reserved2:       0x00000000
122         reserved3:       0x00000000
123       - sectname:        __apple_names
124         segname:         __DWARF
125         addr:            0x000000000000023E
126         size:            60
127         offset:          0x000007CE
128         align:           0
129         reloff:          0x00000000
130         nreloc:          0
131         flags:           0x02000000
132         reserved1:       0x00000000
133         reserved2:       0x00000000
134         reserved3:       0x00000000
135       - sectname:        __apple_objc
136         segname:         __DWARF
137         addr:            0x000000000000027A
138         size:            36
139         offset:          0x0000080A
140         align:           0
141         reloff:          0x00000000
142         nreloc:          0
143         flags:           0x02000000
144         reserved1:       0x00000000
145         reserved2:       0x00000000
146         reserved3:       0x00000000
147       - sectname:        __apple_namespac
148         segname:         __DWARF
149         addr:            0x000000000000029E
150         size:            36
151         offset:          0x0000082E
152         align:           0
153         reloff:          0x00000000
154         nreloc:          0
155         flags:           0x02000000
156         reserved1:       0x00000000
157         reserved2:       0x00000000
158         reserved3:       0x00000000
159       - sectname:        __apple_types
160         segname:         __DWARF
161         addr:            0x00000000000002C2
162         size:            133
163         offset:          0x00000852
164         align:           0
165         reloff:          0x00000000
166         nreloc:          0
167         flags:           0x02000000
168         reserved1:       0x00000000
169         reserved2:       0x00000000
170         reserved3:       0x00000000
171       - sectname:        __compact_unwind
172         segname:         __LD
173         addr:            0x0000000000000348
174         size:            32
175         offset:          0x000008D8
176         align:           3
177         reloff:          0x000009F8
178         nreloc:          1
179         flags:           0x02000000
180         reserved1:       0x00000000
181         reserved2:       0x00000000
182         reserved3:       0x00000000
183       - sectname:        __eh_frame
184         segname:         __TEXT
185         addr:            0x0000000000000368
186         size:            64
187         offset:          0x000008F8
188         align:           3
189         reloff:          0x00000000
190         nreloc:          0
191         flags:           0x6800000B
192         reserved1:       0x00000000
193         reserved2:       0x00000000
194         reserved3:       0x00000000
195       - sectname:        __debug_line
196         segname:         __DWARF
197         addr:            0x00000000000003A8
198         size:            150
199         offset:          0x00000938
200         align:           0
201         reloff:          0x00000A00
202         nreloc:          1
203         flags:           0x02000000
204         reserved1:       0x00000000
205         reserved2:       0x00000000
206         reserved3:       0x00000000
207   - cmd:             LC_VERSION_MIN_MACOSX
208     cmdsize:         16
209     version:         658432
210     sdk:             0
211   - cmd:             LC_SYMTAB
212     cmdsize:         24
213     symoff:          2568
214     nsyms:           2
215     stroff:          2600
216     strsize:         36
217   - cmd:             LC_DYSYMTAB
218     cmdsize:         80
219     ilocalsym:       0
220     nlocalsym:       0
221     iextdefsym:      0
222     nextdefsym:      1
223     iundefsym:       1
224     nundefsym:       1
225     tocoff:          0
226     ntoc:            0
227     modtaboff:       0
228     nmodtab:         0
229     extrefsymoff:    0
230     nextrefsyms:     0
231     indirectsymoff:  0
232     nindirectsyms:   0
233     extreloff:       0
234     nextrel:         0
235     locreloff:       0
236     nlocrel:         0
237 LinkEditData:    
238   NameList:        
239     - n_strx:          24
240       n_type:          0x0F
241       n_sect:          1
242       n_desc:          0
243       n_value:         0
244     - n_strx:          1
245       n_type:          0x01
246       n_sect:          0
247       n_desc:          0
248       n_value:         0
249   StringTable:     
250     - ''
251     - _compilerrt_abort_impl
252     - ___absvdi2
253     - ''
254 DWARF:           
255   debug_str:       
256     - 'clang version 4.0.0 (trunk 290181) (llvm/trunk 290209)'
257     - ../compiler-rt/lib/builtins/absvdi2.c
258     - /Users/cbieneman/dev/open-source/llvm-build-rel
259     - int
260     - di_int
261     - long long int
262     - __absvdi2
263     - a
264     - N
265     - t
266   debug_abbrev:    
267     - Code:            0x00000001
268       Tag:             DW_TAG_compile_unit
269       Children:        DW_CHILDREN_yes
270       Attributes:      
271         - Attribute:       DW_AT_producer
272           Form:            DW_FORM_strp
273         - Attribute:       DW_AT_language
274           Form:            DW_FORM_data2
275         - Attribute:       DW_AT_name
276           Form:            DW_FORM_strp
277         - Attribute:       DW_AT_stmt_list
278           Form:            DW_FORM_sec_offset
279         - Attribute:       DW_AT_comp_dir
280           Form:            DW_FORM_strp
281         - Attribute:       DW_AT_low_pc
282           Form:            DW_FORM_addr
283         - Attribute:       DW_AT_high_pc
284           Form:            DW_FORM_data4
285     - Code:            0x00000002
286       Tag:             DW_TAG_base_type
287       Children:        DW_CHILDREN_no
288       Attributes:      
289         - Attribute:       DW_AT_name
290           Form:            DW_FORM_strp
291         - Attribute:       DW_AT_encoding
292           Form:            DW_FORM_data1
293         - Attribute:       DW_AT_byte_size
294           Form:            DW_FORM_data1
295     - Code:            0x00000003
296       Tag:             DW_TAG_typedef
297       Children:        DW_CHILDREN_no
298       Attributes:      
299         - Attribute:       DW_AT_type
300           Form:            DW_FORM_ref4
301         - Attribute:       DW_AT_name
302           Form:            DW_FORM_strp
303         - Attribute:       DW_AT_decl_file
304           Form:            DW_FORM_data1
305         - Attribute:       DW_AT_decl_line
306           Form:            DW_FORM_data1
307     - Code:            0x00000004
308       Tag:             DW_TAG_subprogram
309       Children:        DW_CHILDREN_yes
310       Attributes:      
311         - Attribute:       DW_AT_low_pc
312           Form:            DW_FORM_addr
313         - Attribute:       DW_AT_high_pc
314           Form:            DW_FORM_data4
315         - Attribute:       DW_AT_frame_base
316           Form:            DW_FORM_exprloc
317         - Attribute:       DW_AT_name
318           Form:            DW_FORM_strp
319         - Attribute:       DW_AT_decl_file
320           Form:            DW_FORM_data1
321         - Attribute:       DW_AT_decl_line
322           Form:            DW_FORM_data1
323         - Attribute:       DW_AT_prototyped
324           Form:            DW_FORM_flag_present
325         - Attribute:       DW_AT_type
326           Form:            DW_FORM_ref4
327         - Attribute:       DW_AT_external
328           Form:            DW_FORM_flag_present
329     - Code:            0x00000005
330       Tag:             DW_TAG_formal_parameter
331       Children:        DW_CHILDREN_no
332       Attributes:      
333         - Attribute:       DW_AT_location
334           Form:            DW_FORM_exprloc
335         - Attribute:       DW_AT_name
336           Form:            DW_FORM_strp
337         - Attribute:       DW_AT_decl_file
338           Form:            DW_FORM_data1
339         - Attribute:       DW_AT_decl_line
340           Form:            DW_FORM_data1
341         - Attribute:       DW_AT_type
342           Form:            DW_FORM_ref4
343     - Code:            0x00000006
344       Tag:             DW_TAG_variable
345       Children:        DW_CHILDREN_no
346       Attributes:      
347         - Attribute:       DW_AT_location
348           Form:            DW_FORM_exprloc
349         - Attribute:       DW_AT_name
350           Form:            DW_FORM_strp
351         - Attribute:       DW_AT_decl_file
352           Form:            DW_FORM_data1
353         - Attribute:       DW_AT_decl_line
354           Form:            DW_FORM_data1
355         - Attribute:       DW_AT_type
356           Form:            DW_FORM_ref4
357     - Code:            0x00000007
358       Tag:             DW_TAG_const_type
359       Children:        DW_CHILDREN_no
360       Attributes:      
361         - Attribute:       DW_AT_type
362           Form:            DW_FORM_ref4
365 #CHECK: DWARF:           
366 #CHECK:   debug_str:       
367 #CHECK:     - 'clang version 4.0.0 (trunk 290181) (llvm/trunk 290209)'
368 #CHECK:     - '../compiler-rt/lib/builtins/absvdi2.c'
369 #CHECK:     - '/Users/cbieneman/dev/open-source/llvm-build-rel'
370 #CHECK:     - int
371 #CHECK:     - di_int
372 #CHECK:     - long long int
373 #CHECK:     - __absvdi2
374 #CHECK:     - a
375 #CHECK:     - N
376 #CHECK:     - t
377 #CHECK:   debug_abbrev:    
378 #CHECK:     - Code:            0x00000001
379 #CHECK:       Tag:             DW_TAG_compile_unit
380 #CHECK:       Children:        DW_CHILDREN_yes
381 #CHECK:       Attributes:      
382 #CHECK:         - Attribute:       DW_AT_producer
383 #CHECK:           Form:            DW_FORM_strp
384 #CHECK:         - Attribute:       DW_AT_language
385 #CHECK:           Form:            DW_FORM_data2
386 #CHECK:         - Attribute:       DW_AT_name
387 #CHECK:           Form:            DW_FORM_strp
388 #CHECK:         - Attribute:       DW_AT_stmt_list
389 #CHECK:           Form:            DW_FORM_sec_offset
390 #CHECK:         - Attribute:       DW_AT_comp_dir
391 #CHECK:           Form:            DW_FORM_strp
392 #CHECK:         - Attribute:       DW_AT_low_pc
393 #CHECK:           Form:            DW_FORM_addr
394 #CHECK:         - Attribute:       DW_AT_high_pc
395 #CHECK:           Form:            DW_FORM_data4
396 #CHECK:     - Code:            0x00000002
397 #CHECK:       Tag:             DW_TAG_base_type
398 #CHECK:       Children:        DW_CHILDREN_no
399 #CHECK:       Attributes:      
400 #CHECK:         - Attribute:       DW_AT_name
401 #CHECK:           Form:            DW_FORM_strp
402 #CHECK:         - Attribute:       DW_AT_encoding
403 #CHECK:           Form:            DW_FORM_data1
404 #CHECK:         - Attribute:       DW_AT_byte_size
405 #CHECK:           Form:            DW_FORM_data1
406 #CHECK:     - Code:            0x00000003
407 #CHECK:       Tag:             DW_TAG_typedef
408 #CHECK:       Children:        DW_CHILDREN_no
409 #CHECK:       Attributes:      
410 #CHECK:         - Attribute:       DW_AT_type
411 #CHECK:           Form:            DW_FORM_ref4
412 #CHECK:         - Attribute:       DW_AT_name
413 #CHECK:           Form:            DW_FORM_strp
414 #CHECK:         - Attribute:       DW_AT_decl_file
415 #CHECK:           Form:            DW_FORM_data1
416 #CHECK:         - Attribute:       DW_AT_decl_line
417 #CHECK:           Form:            DW_FORM_data1
418 #CHECK:     - Code:            0x00000004
419 #CHECK:       Tag:             DW_TAG_subprogram
420 #CHECK:       Children:        DW_CHILDREN_yes
421 #CHECK:       Attributes:      
422 #CHECK:         - Attribute:       DW_AT_low_pc
423 #CHECK:           Form:            DW_FORM_addr
424 #CHECK:         - Attribute:       DW_AT_high_pc
425 #CHECK:           Form:            DW_FORM_data4
426 #CHECK:         - Attribute:       DW_AT_frame_base
427 #CHECK:           Form:            DW_FORM_exprloc
428 #CHECK:         - Attribute:       DW_AT_name
429 #CHECK:           Form:            DW_FORM_strp
430 #CHECK:         - Attribute:       DW_AT_decl_file
431 #CHECK:           Form:            DW_FORM_data1
432 #CHECK:         - Attribute:       DW_AT_decl_line
433 #CHECK:           Form:            DW_FORM_data1
434 #CHECK:         - Attribute:       DW_AT_prototyped
435 #CHECK:           Form:            DW_FORM_flag_present
436 #CHECK:         - Attribute:       DW_AT_type
437 #CHECK:           Form:            DW_FORM_ref4
438 #CHECK:         - Attribute:       DW_AT_external
439 #CHECK:           Form:            DW_FORM_flag_present
440 #CHECK:     - Code:            0x00000005
441 #CHECK:       Tag:             DW_TAG_formal_parameter
442 #CHECK:       Children:        DW_CHILDREN_no
443 #CHECK:       Attributes:      
444 #CHECK:         - Attribute:       DW_AT_location
445 #CHECK:           Form:            DW_FORM_exprloc
446 #CHECK:         - Attribute:       DW_AT_name
447 #CHECK:           Form:            DW_FORM_strp
448 #CHECK:         - Attribute:       DW_AT_decl_file
449 #CHECK:           Form:            DW_FORM_data1
450 #CHECK:         - Attribute:       DW_AT_decl_line
451 #CHECK:           Form:            DW_FORM_data1
452 #CHECK:         - Attribute:       DW_AT_type
453 #CHECK:           Form:            DW_FORM_ref4
454 #CHECK:     - Code:            0x00000006
455 #CHECK:       Tag:             DW_TAG_variable
456 #CHECK:       Children:        DW_CHILDREN_no
457 #CHECK:       Attributes:      
458 #CHECK:         - Attribute:       DW_AT_location
459 #CHECK:           Form:            DW_FORM_exprloc
460 #CHECK:         - Attribute:       DW_AT_name
461 #CHECK:           Form:            DW_FORM_strp
462 #CHECK:         - Attribute:       DW_AT_decl_file
463 #CHECK:           Form:            DW_FORM_data1
464 #CHECK:         - Attribute:       DW_AT_decl_line
465 #CHECK:           Form:            DW_FORM_data1
466 #CHECK:         - Attribute:       DW_AT_type
467 #CHECK:           Form:            DW_FORM_ref4
468 #CHECK:     - Code:            0x00000007
469 #CHECK:       Tag:             DW_TAG_const_type
470 #CHECK:       Children:        DW_CHILDREN_no
471 #CHECK:       Attributes:      
472 #CHECK:         - Attribute:       DW_AT_type
473 #CHECK:           Form:            DW_FORM_ref4
474 #CHECK: ...