Follow up to d0858bffa11, add missing REQUIRES x86
[llvm-project.git] / llvm / test / tools / dsymutil / X86 / DWARFLinkerParallel / odr-parents.test
blob7c1c0d1b52e0eec48dd5618bf6f1bd1e209bfe1a
1 # RUN: yaml2obj %s -o %t.o
2 # RUN: echo '---' > %t2.map
3 # RUN: echo "triple:          'x86_64-apple-darwin'" >> %t2.map
4 # RUN: echo 'objects:'  >> %t2.map
5 # RUN: echo " -  filename: '%t.o'" >> %t2.map
6 # RUN: echo '    symbols:' >> %t2.map
7 # RUN: echo '      - { sym: __Z3foov, objAddr: 0x0, binAddr: 0x10000, size: 0x10 }' >> %t2.map
8 # RUN: echo '...' >> %t2.map
9 # RUN: dsymutil --linker=llvm -y %t2.map -f -o - | llvm-dwarfdump -a - | FileCheck %s
11 ## This test checks debug info for the equally named structures from
12 ## different namespaces. The result should contain two variables which
13 ## reference different types("A::C1::I1 *const" and "B::C1::I1 *const")
15 # CHECK: file format Mach-O 64-bit x86-64
16 # CHECK: .debug_info contents:
17 # CHECK: Compile Unit:
18 # CHECK: DW_TAG_compile_unit
19 # CHECK: DW_AT_name{{.*}}"__artificial_type_unit"
21 # CHECK: 0x[[INT:[0-9a-f]*]]: DW_TAG_base_type
22 # CHECK: DW_AT_name{{.*}}"int"
24 # CHECK: DW_TAG_namespace{{.*[[:space:]].*}}DW_AT_name{{.*}}"A"
26 # CHECK: 0x[[A_C1:[0-9a-f]*]]: DW_TAG_structure_type
27 # CHECK: DW_AT_name{{.*}}"C1"
28 # CHECK: DW_TAG_member
29 # CHECK: DW_AT_type{{.*}}0x[[INT]] "int"
30 # CHECK: DW_AT_name{{.*}}"I1"
32 # CHECK: DW_TAG_namespace{{.*[[:space:]].*}}DW_AT_name{{.*}}"B"
34 # CHECK: 0x[[B_C1:[0-9a-f]*]]: DW_TAG_structure_type
35 # CHECK: DW_AT_name{{.*}}"C1"
36 # CHECK: DW_TAG_member
37 # CHECK: DW_AT_type{{.*}}0x[[INT]] "int"
38 # CHECK: DW_AT_name{{.*}}"I1"
40 # CHECK: 0x[[PTR_A_C1:[0-9a-f]*]]: DW_TAG_pointer_type{{.*[[:space:]].*}}DW_AT_type{{.*}}0x[[A_C1:[0-9a-f]*]] "A::C1"
42 # CHECK: 0x[[PTR_B_C1:[0-9a-f]*]]: DW_TAG_pointer_type{{.*[[:space:]].*}}DW_AT_type{{.*}}0x[[B_C1:[0-9a-f]*]] "B::C1"
44 # CHECK: 0x[[CONST_A_C1:[0-9a-f]*]]: DW_TAG_const_type{{.*[[:space:]].*}}DW_AT_type{{.*}}0x[[PTR_A_C1]] "A::C1 *"
46 # CHECK: 0x[[CONST_B_C1:[0-9a-f]*]]: DW_TAG_const_type{{.*[[:space:]].*}}DW_AT_type{{.*}}0x[[PTR_B_C1]] "B::C1 *"
48 # CHECK: DW_TAG_compile_unit
49 # CHECK: DW_TAG_variable
50 # CHECK: DW_AT_name{{.*}}"var1"
51 # CHECK: DW_AT_type{{.*}}0x00000000[[CONST_A_C1]] "A::C1 *const"
52 # CHECK: DW_TAG_variable
53 # CHECK: DW_AT_name{{.*}}"var2"
54 # CHECK: DW_AT_type{{.*}}0x00000000[[CONST_B_C1]] "B::C1 *const"
57 --- !mach-o
58 FileHeader:
59   magic:      0xFEEDFACF
60   cputype:    0x01000007
61   cpusubtype: 0x00000003
62   filetype:   0x00000001
63   ncmds:      2
64   sizeofcmds: 376
65   flags:      0x00002000
66   reserved:   0x00000000
67 LoadCommands:
68   - cmd:      LC_SEGMENT_64
69     cmdsize:  232
70     segname:  ''
71     vmaddr:   0x00
72     vmsize:   0x300
73     fileoff:  0x300
74     filesize: 0x300
75     maxprot:  7
76     initprot: 7
77     nsects:   2
78     flags:    0
79     Sections:
80       - sectname:  __debug_abbrev
81         segname:   __DWARF
82         addr:      0x000000000000000F
83         size:      0x41
84         offset:    0x00000380
85         align:     0
86         reloff:    0x00000000
87         nreloc:    0
88         flags:     0x02000000
89         reserved1: 0x00000000
90         reserved2: 0x00000000
91         reserved3: 0x00000000
92       - sectname:  __debug_info
93         segname:   __DWARF
94         addr:      0x000000000000100
95         size:      0x6e
96         offset:    0x000003C1
97         align:     0
98         reloff:    0x00000600
99         nreloc:    1
100         flags:     0x02000000
101         reserved1: 0x00000000
102         reserved2: 0x00000000
103         reserved3: 0x00000000
104         relocations:
105           - address:         0x000001FC
106             symbolnum:       1
107             pcrel:           true
108             length:          3
109             extern:          false
110             type:            0
111             scattered:       false
112             value:           0
113   - cmd:             LC_SYMTAB
114     cmdsize:         24
115     symoff:          0x700
116     nsyms:           1
117     stroff:          0x710
118     strsize:         10
119 LinkEditData:
120   NameList:
121     - n_strx:          1
122       n_type:          0x0F
123       n_sect:          1
124       n_desc:          0
125       n_value:         0
126   StringTable:
127     - ''
128     - '__Z3foov'
129     - ''
130 DWARF:
131   debug_abbrev:
132     - Table:
133       - Tag:      DW_TAG_compile_unit
134         Children: DW_CHILDREN_yes
135         Attributes:
136           - Attribute: DW_AT_producer
137             Form:      DW_FORM_string
138           - Attribute: DW_AT_language
139             Form:      DW_FORM_data2
140       - Tag:      DW_TAG_namespace
141         Children: DW_CHILDREN_yes
142         Attributes:
143           - Attribute: DW_AT_name
144             Form:      DW_FORM_string
145       - Tag:      DW_TAG_structure_type
146         Children: DW_CHILDREN_yes
147         Attributes:
148           - Attribute: DW_AT_name
149             Form:      DW_FORM_string
150       - Tag:      DW_TAG_member
151         Children: DW_CHILDREN_no
152         Attributes:
153           - Attribute: DW_AT_type
154             Form:      DW_FORM_ref_addr
155           - Attribute: DW_AT_name
156             Form:      DW_FORM_string
157       - Tag:      DW_TAG_base_type
158         Children: DW_CHILDREN_no
159         Attributes:
160           - Attribute: DW_AT_name
161             Form:      DW_FORM_string
162       - Tag:      DW_TAG_pointer_type
163         Children: DW_CHILDREN_no
164         Attributes:
165           - Attribute: DW_AT_type
166             Form:      DW_FORM_ref_addr
167       - Tag:      DW_TAG_const_type
168         Children: DW_CHILDREN_no
169         Attributes:
170           - Attribute: DW_AT_type
171             Form:      DW_FORM_ref_addr
172       - Tag:      DW_TAG_variable
173         Children: DW_CHILDREN_no
174         Attributes:
175           - Attribute: DW_AT_name
176             Form:      DW_FORM_string
177           - Attribute: DW_AT_const_value
178             Form:      DW_FORM_data4
179           - Attribute: DW_AT_type
180             Form:      DW_FORM_ref_addr
181   debug_info:
182     - Version: 4
183       Entries:
184         - AbbrCode: 1
185           Values:
186             - CStr: by_hand
187             - Value:  0x04
188         - AbbrCode: 2
189           Values:
190             - CStr: A
191         - AbbrCode: 3
192           Values:
193             - CStr: C1
194         - AbbrCode: 4
195           Values:
196             - Value:  0x00000038
197             - CStr: I1
198         - AbbrCode: 0
199         - AbbrCode: 0
200         - AbbrCode: 2
201           Values:
202             - CStr: B
203         - AbbrCode: 3
204           Values:
205             - CStr: C1
206         - AbbrCode: 4
207           Values:
208             - Value:  0x00000038
209             - CStr: I1
210         - AbbrCode: 0
211         - AbbrCode: 0
212         - AbbrCode: 5
213           Values:
214             - CStr: int
215         - AbbrCode: 6
216           Values:
217             - Value:  0x00000019
218         - AbbrCode: 6
219           Values:
220             - Value:  0x0000002a
221         - AbbrCode: 7
222           Values:
223             - Value:  0x0000003D
224         - AbbrCode: 7
225           Values:
226             - Value:  0x00000042
227         - AbbrCode: 8
228           Values:
229             - CStr: var1
230             - Value:  0x00000000
231             - Value:  0x00000047
232         - AbbrCode: 8
233           Values:
234             - CStr: var2
235             - Value:  0x00000000
236             - Value:  0x0000004C
237         - AbbrCode: 0