[Alignment][NFC] Instructions::getLoadStoreAlignment
[llvm-complete.git] / test / tools / llvm-dwarfdump / X86 / typeunit-name.s
blob7b60ac96ffe8d4a708b5f6080159561f6346f3d7
1 # Demonstrate that -name works with type units.
2 # RUN: llvm-mc -triple x86_64-unknown-linux %s -filetype=obj -o %t.o
3 # RUN: llvm-dwarfdump -name=V4_type_unit -name=V5_split_type_unit %t.o | FileCheck %s
5 # The names should appear twice, once for the unit and once for the type DIE,
6 # because we give them the same name.
7 # CHECK: V4_type_unit
8 # CHECK: V4_type_unit
9 # CHECK: V5_split_type_unit
10 # CHECK: V5_split_type_unit
12 .section .debug_str,"MS",@progbits,1
13 str_TU_4:
14 .asciz "V4_type_unit"
16 .section .debug_str.dwo,"MS",@progbits,1
17 dwo_TU_5:
18 .asciz "V5_split_type_unit"
20 # Abbrev section for the normal type unit.
21 .section .debug_abbrev,"",@progbits
22 .byte 0x01 # Abbrev code
23 .byte 0x41 # DW_TAG_type_unit
24 .byte 0x01 # DW_CHILDREN_yes
25 .byte 0x03 # DW_AT_name
26 .byte 0x0e # DW_FORM_strp
27 .byte 0x00 # EOM(1)
28 .byte 0x00 # EOM(2)
29 .byte 0x02 # Abbrev code
30 .byte 0x13 # DW_TAG_structure_type
31 .byte 0x00 # DW_CHILDREN_no (no members)
32 .byte 0x03 # DW_AT_name
33 .byte 0x0e # DW_FORM_strp
34 .byte 0x00 # EOM(1)
35 .byte 0x00 # EOM(2)
36 .byte 0x00 # EOM(3)
38 # And a .dwo copy for the .dwo section.
39 .section .debug_abbrev.dwo,"",@progbits
40 .byte 0x01 # Abbrev code
41 .byte 0x41 # DW_TAG_type_unit
42 .byte 0x01 # DW_CHILDREN_yes
43 .byte 0x03 # DW_AT_name
44 .byte 0x0e # DW_FORM_strp
45 .byte 0x00 # EOM(1)
46 .byte 0x00 # EOM(2)
47 .byte 0x02 # Abbrev code
48 .byte 0x13 # DW_TAG_structure_type
49 .byte 0x00 # DW_CHILDREN_no (no members)
50 .byte 0x03 # DW_AT_name
51 .byte 0x0e # DW_FORM_strp
52 .byte 0x00 # EOM(1)
53 .byte 0x00 # EOM(2)
54 .byte 0x00 # EOM(3)
56 .section .debug_types,"",@progbits
58 # DWARF v4 Type unit header. Normal/split are identical so we do only one.
59 TU_4_start:
60 .long TU_4_end-TU_4_version # Length of Unit
61 TU_4_version:
62 .short 4 # DWARF version number
63 .long .debug_abbrev # Offset Into Abbrev. Section
64 .byte 8 # Address Size (in bytes)
65 .quad 0x0011223344556677 # Type Signature
66 .long TU_4_type-TU_4_start # Type offset
67 # The type-unit DIE, which has a name.
68 .byte 1
69 .long str_TU_4
70 # The type DIE, which has the same name.
71 TU_4_type:
72 .byte 2
73 .long str_TU_4
74 .byte 0 # NULL
75 .byte 0 # NULL
76 TU_4_end:
78 .section .debug_types.dwo,"",@progbits
79 # FIXME: DWARF v5 wants type units in .debug_info[.dwo] not .debug_types[.dwo].
81 # DWARF v5 split type unit header.
82 TU_split_5_start:
83 .long TU_split_5_end-TU_split_5_version # Length of Unit
84 TU_split_5_version:
85 .short 5 # DWARF version number
86 .byte 6 # DWARF Unit Type
87 .byte 8 # Address Size (in bytes)
88 .long .debug_abbrev.dwo # Offset Into Abbrev. Section
89 .quad 0x8899aabbccddeeff # Type Signature
90 .long TU_split_5_type-TU_split_5_start # Type offset
91 # The type-unit DIE, which has a name.
92 .byte 1
93 .long dwo_TU_5
94 # The type DIE, which has the same name.
95 TU_split_5_type:
96 .byte 2
97 .long dwo_TU_5
98 .byte 0 # NULL
99 .byte 0 # NULL
100 TU_split_5_end: