xref: /llvm-project/bolt/test/X86/Inputs/dwarf5-df-types-dup-helper.s (revision b47b3bee7ba500e81646aa9720f5ca1eddd66875)
1# clang++ -gsplit-dwarf -g2 -gdwarf-5 -gpubnames -fdebug-types-section -fdebug-compilation-dir='.'
2# header.h
3# struct Foo2a {
4#   char *c1;
5#   char *c2;
6#   char *c3;
7# };
8
9# main.cpp
10# #include "header.h"
11# int fooint;
12# struct Foo2Int {
13#    int *c1;
14#    int *c2;
15# };
16#
17# int foo() {
18#   Foo2Int fint;
19#   Foo2a f;
20#   return 0;
21# }
22
23	.text
24	.file	"helper.cpp"
25	.file	0 "." "helper.cpp" md5 0xc33186b2db66a78883b1546aace9855d
26	.globl	_Z3foov                         # -- Begin function _Z3foov
27	.p2align	4, 0x90
28	.type	_Z3foov,@function
29_Z3foov:                                # @_Z3foov
30.Lfunc_begin0:
31	.loc	0 8 0                           # helper.cpp:8:0
32	.cfi_startproc
33# %bb.0:                                # %entry
34	pushq	%rbp
35	.cfi_def_cfa_offset 16
36	.cfi_offset %rbp, -16
37	movq	%rsp, %rbp
38	.cfi_def_cfa_register %rbp
39.Ltmp0:
40	.loc	0 11 3 prologue_end             # helper.cpp:11:3
41	xorl	%eax, %eax
42	.loc	0 11 3 epilogue_begin is_stmt 0 # helper.cpp:11:3
43	popq	%rbp
44	.cfi_def_cfa %rsp, 8
45	retq
46.Ltmp1:
47.Lfunc_end0:
48	.size	_Z3foov, .Lfunc_end0-_Z3foov
49	.cfi_endproc
50                                        # -- End function
51	.type	fooint,@object                  # @fooint
52	.bss
53	.globl	fooint
54	.p2align	2, 0x0
55fooint:
56	.long	0                               # 0x0
57	.size	fooint, 4
58
59	.section	.debug_info.dwo,"e",@progbits
60	.long	.Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit
61.Ldebug_info_dwo_start0:
62	.short	5                               # DWARF version number
63	.byte	6                               # DWARF Unit Type
64	.byte	8                               # Address Size (in bytes)
65	.long	0                               # Offset Into Abbrev. Section
66	.quad	-3882554063269480080            # Type Signature
67	.long	31                              # Type DIE Offset
68	.byte	1                               # Abbrev [1] 0x18:0x2a DW_TAG_type_unit
69	.short	33                              # DW_AT_language
70	.long	0                               # DW_AT_stmt_list
71	.byte	2                               # Abbrev [2] 0x1f:0x19 DW_TAG_structure_type
72	.byte	5                               # DW_AT_calling_convention
73	.byte	7                               # DW_AT_name
74	.byte	16                              # DW_AT_byte_size
75	.byte	0                               # DW_AT_decl_file
76	.byte	3                               # DW_AT_decl_line
77	.byte	3                               # Abbrev [3] 0x25:0x9 DW_TAG_member
78	.byte	5                               # DW_AT_name
79	.long	56                              # DW_AT_type
80	.byte	0                               # DW_AT_decl_file
81	.byte	4                               # DW_AT_decl_line
82	.byte	0                               # DW_AT_data_member_location
83	.byte	3                               # Abbrev [3] 0x2e:0x9 DW_TAG_member
84	.byte	6                               # DW_AT_name
85	.long	56                              # DW_AT_type
86	.byte	0                               # DW_AT_decl_file
87	.byte	5                               # DW_AT_decl_line
88	.byte	8                               # DW_AT_data_member_location
89	.byte	0                               # End Of Children Mark
90	.byte	4                               # Abbrev [4] 0x38:0x5 DW_TAG_pointer_type
91	.long	61                              # DW_AT_type
92	.byte	5                               # Abbrev [5] 0x3d:0x4 DW_TAG_base_type
93	.byte	1                               # DW_AT_name
94	.byte	5                               # DW_AT_encoding
95	.byte	4                               # DW_AT_byte_size
96	.byte	0                               # End Of Children Mark
97.Ldebug_info_dwo_end0:
98	.long	.Ldebug_info_dwo_end1-.Ldebug_info_dwo_start1 # Length of Unit
99.Ldebug_info_dwo_start1:
100	.short	5                               # DWARF version number
101	.byte	6                               # DWARF Unit Type
102	.byte	8                               # Address Size (in bytes)
103	.long	0                               # Offset Into Abbrev. Section
104	.quad	1175092228111723119             # Type Signature
105	.long	31                              # Type DIE Offset
106	.byte	1                               # Abbrev [1] 0x18:0x33 DW_TAG_type_unit
107	.short	33                              # DW_AT_language
108	.long	0                               # DW_AT_stmt_list
109	.byte	2                               # Abbrev [2] 0x1f:0x22 DW_TAG_structure_type
110	.byte	5                               # DW_AT_calling_convention
111	.byte	11                              # DW_AT_name
112	.byte	24                              # DW_AT_byte_size
113	.byte	1                               # DW_AT_decl_file
114	.byte	1                               # DW_AT_decl_line
115	.byte	3                               # Abbrev [3] 0x25:0x9 DW_TAG_member
116	.byte	5                               # DW_AT_name
117	.long	65                              # DW_AT_type
118	.byte	1                               # DW_AT_decl_file
119	.byte	2                               # DW_AT_decl_line
120	.byte	0                               # DW_AT_data_member_location
121	.byte	3                               # Abbrev [3] 0x2e:0x9 DW_TAG_member
122	.byte	6                               # DW_AT_name
123	.long	65                              # DW_AT_type
124	.byte	1                               # DW_AT_decl_file
125	.byte	3                               # DW_AT_decl_line
126	.byte	8                               # DW_AT_data_member_location
127	.byte	3                               # Abbrev [3] 0x37:0x9 DW_TAG_member
128	.byte	10                              # DW_AT_name
129	.long	65                              # DW_AT_type
130	.byte	1                               # DW_AT_decl_file
131	.byte	4                               # DW_AT_decl_line
132	.byte	16                              # DW_AT_data_member_location
133	.byte	0                               # End Of Children Mark
134	.byte	4                               # Abbrev [4] 0x41:0x5 DW_TAG_pointer_type
135	.long	70                              # DW_AT_type
136	.byte	5                               # Abbrev [5] 0x46:0x4 DW_TAG_base_type
137	.byte	9                               # DW_AT_name
138	.byte	6                               # DW_AT_encoding
139	.byte	1                               # DW_AT_byte_size
140	.byte	0                               # End Of Children Mark
141.Ldebug_info_dwo_end1:
142	.section	.debug_abbrev,"",@progbits
143	.byte	1                               # Abbreviation Code
144	.byte	74                              # DW_TAG_skeleton_unit
145	.byte	0                               # DW_CHILDREN_no
146	.byte	16                              # DW_AT_stmt_list
147	.byte	23                              # DW_FORM_sec_offset
148	.byte	114                             # DW_AT_str_offsets_base
149	.byte	23                              # DW_FORM_sec_offset
150	.byte	27                              # DW_AT_comp_dir
151	.byte	37                              # DW_FORM_strx1
152	.byte	118                             # DW_AT_dwo_name
153	.byte	37                              # DW_FORM_strx1
154	.byte	17                              # DW_AT_low_pc
155	.byte	27                              # DW_FORM_addrx
156	.byte	18                              # DW_AT_high_pc
157	.byte	6                               # DW_FORM_data4
158	.byte	115                             # DW_AT_addr_base
159	.byte	23                              # DW_FORM_sec_offset
160	.byte	0                               # EOM(1)
161	.byte	0                               # EOM(2)
162	.byte	0                               # EOM(3)
163	.section	.debug_info,"",@progbits
164.Lcu_begin0:
165	.long	.Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
166.Ldebug_info_start0:
167	.short	5                               # DWARF version number
168	.byte	4                               # DWARF Unit Type
169	.byte	8                               # Address Size (in bytes)
170	.long	.debug_abbrev                   # Offset Into Abbrev. Section
171	.quad	2142419470755914572
172	.byte	1                               # Abbrev [1] 0x14:0x14 DW_TAG_skeleton_unit
173	.long	.Lline_table_start0             # DW_AT_stmt_list
174	.long	.Lstr_offsets_base0             # DW_AT_str_offsets_base
175	.byte	0                               # DW_AT_comp_dir
176	.byte	1                               # DW_AT_dwo_name
177	.byte	1                               # DW_AT_low_pc
178	.long	.Lfunc_end0-.Lfunc_begin0       # DW_AT_high_pc
179	.long	.Laddr_table_base0              # DW_AT_addr_base
180.Ldebug_info_end0:
181	.section	.debug_str_offsets,"",@progbits
182	.long	12                              # Length of String Offsets Set
183	.short	5
184	.short	0
185.Lstr_offsets_base0:
186	.section	.debug_str,"MS",@progbits,1
187.Lskel_string0:
188	.asciz	"."                             # string offset=0
189.Lskel_string1:
190	.asciz	"helper.dwo"                    # string offset=2
191	.section	.debug_str_offsets,"",@progbits
192	.long	.Lskel_string0
193	.long	.Lskel_string1
194	.section	.debug_str_offsets.dwo,"e",@progbits
195	.long	64                              # Length of String Offsets Set
196	.short	5
197	.short	0
198	.section	.debug_str.dwo,"eMS",@progbits,1
199.Linfo_string0:
200	.asciz	"fooint"                        # string offset=0
201.Linfo_string1:
202	.asciz	"int"                           # string offset=7
203.Linfo_string2:
204	.asciz	"_Z3foov"                       # string offset=11
205.Linfo_string3:
206	.asciz	"foo"                           # string offset=19
207.Linfo_string4:
208	.asciz	"fint"                          # string offset=23
209.Linfo_string5:
210	.asciz	"c1"                            # string offset=28
211.Linfo_string6:
212	.asciz	"c2"                            # string offset=31
213.Linfo_string7:
214	.asciz	"Foo2Int"                       # string offset=34
215.Linfo_string8:
216	.asciz	"f"                             # string offset=42
217.Linfo_string9:
218	.asciz	"char"                          # string offset=44
219.Linfo_string10:
220	.asciz	"c3"                            # string offset=49
221.Linfo_string11:
222	.asciz	"Foo2a"                         # string offset=52
223.Linfo_string12:
224	.asciz	"clang version 18.0.0"          # string offset=58
225.Linfo_string13:
226	.asciz	"helper.cpp"                    # string offset=79
227.Linfo_string14:
228	.asciz	"helper.dwo"                    # string offset=90
229	.section	.debug_str_offsets.dwo,"e",@progbits
230	.long	0
231	.long	7
232	.long	11
233	.long	19
234	.long	23
235	.long	28
236	.long	31
237	.long	34
238	.long	42
239	.long	44
240	.long	49
241	.long	52
242	.long	58
243	.long	79
244	.long	90
245	.section	.debug_info.dwo,"e",@progbits
246	.long	.Ldebug_info_dwo_end2-.Ldebug_info_dwo_start2 # Length of Unit
247.Ldebug_info_dwo_start2:
248	.short	5                               # DWARF version number
249	.byte	5                               # DWARF Unit Type
250	.byte	8                               # Address Size (in bytes)
251	.long	0                               # Offset Into Abbrev. Section
252	.quad	2142419470755914572
253	.byte	6                               # Abbrev [6] 0x14:0x4f DW_TAG_compile_unit
254	.byte	12                              # DW_AT_producer
255	.short	33                              # DW_AT_language
256	.byte	13                              # DW_AT_name
257	.byte	14                              # DW_AT_dwo_name
258	.byte	7                               # Abbrev [7] 0x1a:0xb DW_TAG_variable
259	.byte	0                               # DW_AT_name
260	.long	37                              # DW_AT_type
261                                        # DW_AT_external
262	.byte	0                               # DW_AT_decl_file
263	.byte	2                               # DW_AT_decl_line
264	.byte	2                               # DW_AT_location
265	.byte	161
266	.byte	0
267	.byte	5                               # Abbrev [5] 0x25:0x4 DW_TAG_base_type
268	.byte	1                               # DW_AT_name
269	.byte	5                               # DW_AT_encoding
270	.byte	4                               # DW_AT_byte_size
271	.byte	8                               # Abbrev [8] 0x29:0x27 DW_TAG_subprogram
272	.byte	1                               # DW_AT_low_pc
273	.long	.Lfunc_end0-.Lfunc_begin0       # DW_AT_high_pc
274	.byte	1                               # DW_AT_frame_base
275	.byte	86
276	.byte	2                               # DW_AT_linkage_name
277	.byte	3                               # DW_AT_name
278	.byte	0                               # DW_AT_decl_file
279	.byte	8                               # DW_AT_decl_line
280	.long	37                              # DW_AT_type
281                                        # DW_AT_external
282	.byte	9                               # Abbrev [9] 0x39:0xb DW_TAG_variable
283	.byte	2                               # DW_AT_location
284	.byte	145
285	.byte	112
286	.byte	4                               # DW_AT_name
287	.byte	0                               # DW_AT_decl_file
288	.byte	9                               # DW_AT_decl_line
289	.long	80                              # DW_AT_type
290	.byte	9                               # Abbrev [9] 0x44:0xb DW_TAG_variable
291	.byte	2                               # DW_AT_location
292	.byte	145
293	.byte	88
294	.byte	8                               # DW_AT_name
295	.byte	0                               # DW_AT_decl_file
296	.byte	10                              # DW_AT_decl_line
297	.long	89                              # DW_AT_type
298	.byte	0                               # End Of Children Mark
299	.byte	10                              # Abbrev [10] 0x50:0x9 DW_TAG_structure_type
300                                        # DW_AT_declaration
301	.quad	-3882554063269480080            # DW_AT_signature
302	.byte	10                              # Abbrev [10] 0x59:0x9 DW_TAG_structure_type
303                                        # DW_AT_declaration
304	.quad	1175092228111723119             # DW_AT_signature
305	.byte	0                               # End Of Children Mark
306.Ldebug_info_dwo_end2:
307	.section	.debug_abbrev.dwo,"e",@progbits
308	.byte	1                               # Abbreviation Code
309	.byte	65                              # DW_TAG_type_unit
310	.byte	1                               # DW_CHILDREN_yes
311	.byte	19                              # DW_AT_language
312	.byte	5                               # DW_FORM_data2
313	.byte	16                              # DW_AT_stmt_list
314	.byte	23                              # DW_FORM_sec_offset
315	.byte	0                               # EOM(1)
316	.byte	0                               # EOM(2)
317	.byte	2                               # Abbreviation Code
318	.byte	19                              # DW_TAG_structure_type
319	.byte	1                               # DW_CHILDREN_yes
320	.byte	54                              # DW_AT_calling_convention
321	.byte	11                              # DW_FORM_data1
322	.byte	3                               # DW_AT_name
323	.byte	37                              # DW_FORM_strx1
324	.byte	11                              # DW_AT_byte_size
325	.byte	11                              # DW_FORM_data1
326	.byte	58                              # DW_AT_decl_file
327	.byte	11                              # DW_FORM_data1
328	.byte	59                              # DW_AT_decl_line
329	.byte	11                              # DW_FORM_data1
330	.byte	0                               # EOM(1)
331	.byte	0                               # EOM(2)
332	.byte	3                               # Abbreviation Code
333	.byte	13                              # DW_TAG_member
334	.byte	0                               # DW_CHILDREN_no
335	.byte	3                               # DW_AT_name
336	.byte	37                              # DW_FORM_strx1
337	.byte	73                              # DW_AT_type
338	.byte	19                              # DW_FORM_ref4
339	.byte	58                              # DW_AT_decl_file
340	.byte	11                              # DW_FORM_data1
341	.byte	59                              # DW_AT_decl_line
342	.byte	11                              # DW_FORM_data1
343	.byte	56                              # DW_AT_data_member_location
344	.byte	11                              # DW_FORM_data1
345	.byte	0                               # EOM(1)
346	.byte	0                               # EOM(2)
347	.byte	4                               # Abbreviation Code
348	.byte	15                              # DW_TAG_pointer_type
349	.byte	0                               # DW_CHILDREN_no
350	.byte	73                              # DW_AT_type
351	.byte	19                              # DW_FORM_ref4
352	.byte	0                               # EOM(1)
353	.byte	0                               # EOM(2)
354	.byte	5                               # Abbreviation Code
355	.byte	36                              # DW_TAG_base_type
356	.byte	0                               # DW_CHILDREN_no
357	.byte	3                               # DW_AT_name
358	.byte	37                              # DW_FORM_strx1
359	.byte	62                              # DW_AT_encoding
360	.byte	11                              # DW_FORM_data1
361	.byte	11                              # DW_AT_byte_size
362	.byte	11                              # DW_FORM_data1
363	.byte	0                               # EOM(1)
364	.byte	0                               # EOM(2)
365	.byte	6                               # Abbreviation Code
366	.byte	17                              # DW_TAG_compile_unit
367	.byte	1                               # DW_CHILDREN_yes
368	.byte	37                              # DW_AT_producer
369	.byte	37                              # DW_FORM_strx1
370	.byte	19                              # DW_AT_language
371	.byte	5                               # DW_FORM_data2
372	.byte	3                               # DW_AT_name
373	.byte	37                              # DW_FORM_strx1
374	.byte	118                             # DW_AT_dwo_name
375	.byte	37                              # DW_FORM_strx1
376	.byte	0                               # EOM(1)
377	.byte	0                               # EOM(2)
378	.byte	7                               # Abbreviation Code
379	.byte	52                              # DW_TAG_variable
380	.byte	0                               # DW_CHILDREN_no
381	.byte	3                               # DW_AT_name
382	.byte	37                              # DW_FORM_strx1
383	.byte	73                              # DW_AT_type
384	.byte	19                              # DW_FORM_ref4
385	.byte	63                              # DW_AT_external
386	.byte	25                              # DW_FORM_flag_present
387	.byte	58                              # DW_AT_decl_file
388	.byte	11                              # DW_FORM_data1
389	.byte	59                              # DW_AT_decl_line
390	.byte	11                              # DW_FORM_data1
391	.byte	2                               # DW_AT_location
392	.byte	24                              # DW_FORM_exprloc
393	.byte	0                               # EOM(1)
394	.byte	0                               # EOM(2)
395	.byte	8                               # Abbreviation Code
396	.byte	46                              # DW_TAG_subprogram
397	.byte	1                               # DW_CHILDREN_yes
398	.byte	17                              # DW_AT_low_pc
399	.byte	27                              # DW_FORM_addrx
400	.byte	18                              # DW_AT_high_pc
401	.byte	6                               # DW_FORM_data4
402	.byte	64                              # DW_AT_frame_base
403	.byte	24                              # DW_FORM_exprloc
404	.byte	110                             # DW_AT_linkage_name
405	.byte	37                              # DW_FORM_strx1
406	.byte	3                               # DW_AT_name
407	.byte	37                              # DW_FORM_strx1
408	.byte	58                              # DW_AT_decl_file
409	.byte	11                              # DW_FORM_data1
410	.byte	59                              # DW_AT_decl_line
411	.byte	11                              # DW_FORM_data1
412	.byte	73                              # DW_AT_type
413	.byte	19                              # DW_FORM_ref4
414	.byte	63                              # DW_AT_external
415	.byte	25                              # DW_FORM_flag_present
416	.byte	0                               # EOM(1)
417	.byte	0                               # EOM(2)
418	.byte	9                               # Abbreviation Code
419	.byte	52                              # DW_TAG_variable
420	.byte	0                               # DW_CHILDREN_no
421	.byte	2                               # DW_AT_location
422	.byte	24                              # DW_FORM_exprloc
423	.byte	3                               # DW_AT_name
424	.byte	37                              # DW_FORM_strx1
425	.byte	58                              # DW_AT_decl_file
426	.byte	11                              # DW_FORM_data1
427	.byte	59                              # DW_AT_decl_line
428	.byte	11                              # DW_FORM_data1
429	.byte	73                              # DW_AT_type
430	.byte	19                              # DW_FORM_ref4
431	.byte	0                               # EOM(1)
432	.byte	0                               # EOM(2)
433	.byte	10                              # Abbreviation Code
434	.byte	19                              # DW_TAG_structure_type
435	.byte	0                               # DW_CHILDREN_no
436	.byte	60                              # DW_AT_declaration
437	.byte	25                              # DW_FORM_flag_present
438	.byte	105                             # DW_AT_signature
439	.byte	32                              # DW_FORM_ref_sig8
440	.byte	0                               # EOM(1)
441	.byte	0                               # EOM(2)
442	.byte	0                               # EOM(3)
443	.section	.debug_line.dwo,"e",@progbits
444.Ltmp2:
445	.long	.Ldebug_line_end0-.Ldebug_line_start0 # unit length
446.Ldebug_line_start0:
447	.short	5
448	.byte	8
449	.byte	0
450	.long	.Lprologue_end0-.Lprologue_start0
451.Lprologue_start0:
452	.byte	1
453	.byte	1
454	.byte	1
455	.byte	-5
456	.byte	14
457	.byte	1
458	.byte	1
459	.byte	1
460	.byte	8
461	.byte	2
462	.byte	46
463	.byte	0
464	.byte	46
465	.byte	0
466	.byte	3
467	.byte	1
468	.byte	8
469	.byte	2
470	.byte	15
471	.byte	5
472	.byte	30
473	.byte	2
474	.ascii	"helper.cpp"
475	.byte	0
476	.byte	0
477	.byte	0xc3, 0x31, 0x86, 0xb2
478	.byte	0xdb, 0x66, 0xa7, 0x88
479	.byte	0x83, 0xb1, 0x54, 0x6a
480	.byte	0xac, 0xe9, 0x85, 0x5d
481	.ascii	"header.h"
482	.byte	0
483	.byte	1
484	.byte	0xfe, 0xa7, 0xbb, 0x1f
485	.byte	0x22, 0xc4, 0x7f, 0x12
486	.byte	0x9e, 0x15, 0x69, 0x5f
487	.byte	0x71, 0x37, 0xa1, 0xe7
488.Lprologue_end0:
489.Ldebug_line_end0:
490	.section	.debug_addr,"",@progbits
491	.long	.Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution
492.Ldebug_addr_start0:
493	.short	5                               # DWARF version number
494	.byte	8                               # Address size
495	.byte	0                               # Segment selector size
496.Laddr_table_base0:
497	.quad	fooint
498	.quad	.Lfunc_begin0
499.Ldebug_addr_end0:
500	.ident	"clang version 18.0.0"
501	.section	".note.GNU-stack","",@progbits
502	.addrsig
503	.section	.debug_line,"",@progbits
504.Lline_table_start0:
505