xref: /llvm-project/llvm/test/tools/llvm-dwp/X86/empty_warning.s (revision 7ae4b8e99fd845af745ccb1bb5d4cd26c6cee23b)
1# RUN: llvm-mc --triple=x86_64-unknown-linux --filetype=obj -dwarf-version=4 %s -o %t.o
2# RUN: llvm-dwp -e %t.o -o %t.dwp 2>&1 | FileCheck %s --check-prefix=CHECK-WARNING
3
4# CHECK-WARNING: warning: executable file does not contain any references to dwo files
5
6.ifdef GEN
7;--- main.c
8int main() {
9    return 0;
10}
11;--- gen
12clang -g -S -gdwarf-4 main.c -o -
13.endif
14	.text
15	.file	"main.c"
16	.globl	main                            # -- Begin function main
17	.p2align	4, 0x90
18	.type	main,@function
19main:                                   # @main
20.Lfunc_begin0:
21	.file	1 "/proc/self/cwd" "main.c"
22	.loc	1 8 0                           # main.c:8:0
23	.cfi_startproc
24# %bb.0:                                # %entry
25	pushq	%rbp
26	.cfi_def_cfa_offset 16
27	.cfi_offset %rbp, -16
28	movq	%rsp, %rbp
29	.cfi_def_cfa_register %rbp
30	xorl	%eax, %eax
31	movl	$0, -4(%rbp)
32.Ltmp0:
33	.loc	1 9 5 prologue_end              # main.c:9:5
34	popq	%rbp
35	.cfi_def_cfa %rsp, 8
36	retq
37.Ltmp1:
38.Lfunc_end0:
39	.size	main, .Lfunc_end0-main
40	.cfi_endproc
41                                        # -- End function
42	.section	.debug_abbrev,"",@progbits
43	.byte	1                               # Abbreviation Code
44	.byte	17                              # DW_TAG_compile_unit
45	.byte	1                               # DW_CHILDREN_yes
46	.byte	37                              # DW_AT_producer
47	.byte	14                              # DW_FORM_strp
48	.byte	19                              # DW_AT_language
49	.byte	5                               # DW_FORM_data2
50	.byte	3                               # DW_AT_name
51	.byte	14                              # DW_FORM_strp
52	.byte	16                              # DW_AT_stmt_list
53	.byte	23                              # DW_FORM_sec_offset
54	.byte	27                              # DW_AT_comp_dir
55	.byte	14                              # DW_FORM_strp
56	.byte	17                              # DW_AT_low_pc
57	.byte	1                               # DW_FORM_addr
58	.byte	18                              # DW_AT_high_pc
59	.byte	6                               # DW_FORM_data4
60	.byte	0                               # EOM(1)
61	.byte	0                               # EOM(2)
62	.byte	2                               # Abbreviation Code
63	.byte	46                              # DW_TAG_subprogram
64	.byte	0                               # DW_CHILDREN_no
65	.byte	17                              # DW_AT_low_pc
66	.byte	1                               # DW_FORM_addr
67	.byte	18                              # DW_AT_high_pc
68	.byte	6                               # DW_FORM_data4
69	.byte	64                              # DW_AT_frame_base
70	.byte	24                              # DW_FORM_exprloc
71	.byte	3                               # DW_AT_name
72	.byte	14                              # DW_FORM_strp
73	.byte	58                              # DW_AT_decl_file
74	.byte	11                              # DW_FORM_data1
75	.byte	59                              # DW_AT_decl_line
76	.byte	11                              # DW_FORM_data1
77	.byte	73                              # DW_AT_type
78	.byte	19                              # DW_FORM_ref4
79	.byte	63                              # DW_AT_external
80	.byte	25                              # DW_FORM_flag_present
81	.byte	0                               # EOM(1)
82	.byte	0                               # EOM(2)
83	.byte	3                               # Abbreviation Code
84	.byte	36                              # DW_TAG_base_type
85	.byte	0                               # DW_CHILDREN_no
86	.byte	3                               # DW_AT_name
87	.byte	14                              # DW_FORM_strp
88	.byte	62                              # DW_AT_encoding
89	.byte	11                              # DW_FORM_data1
90	.byte	11                              # DW_AT_byte_size
91	.byte	11                              # DW_FORM_data1
92	.byte	0                               # EOM(1)
93	.byte	0                               # EOM(2)
94	.byte	0                               # EOM(3)
95	.section	.debug_info,"",@progbits
96.Lcu_begin0:
97	.long	.Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
98.Ldebug_info_start0:
99	.short	4                               # DWARF version number
100	.long	.debug_abbrev                   # Offset Into Abbrev. Section
101	.byte	8                               # Address Size (in bytes)
102	.byte	1                               # Abbrev [1] 0xb:0x40 DW_TAG_compile_unit
103	.long	.Linfo_string0                  # DW_AT_producer
104	.short	12                              # DW_AT_language
105	.long	.Linfo_string1                  # DW_AT_name
106	.long	.Lline_table_start0             # DW_AT_stmt_list
107	.long	.Linfo_string2                  # DW_AT_comp_dir
108	.quad	.Lfunc_begin0                   # DW_AT_low_pc
109	.long	.Lfunc_end0-.Lfunc_begin0       # DW_AT_high_pc
110	.byte	2                               # Abbrev [2] 0x2a:0x19 DW_TAG_subprogram
111	.quad	.Lfunc_begin0                   # DW_AT_low_pc
112	.long	.Lfunc_end0-.Lfunc_begin0       # DW_AT_high_pc
113	.byte	1                               # DW_AT_frame_base
114	.byte	86
115	.long	.Linfo_string3                  # DW_AT_name
116	.byte	1                               # DW_AT_decl_file
117	.byte	8                               # DW_AT_decl_line
118	.long	67                              # DW_AT_type
119                                        # DW_AT_external
120	.byte	3                               # Abbrev [3] 0x43:0x7 DW_TAG_base_type
121	.long	.Linfo_string4                  # DW_AT_name
122	.byte	5                               # DW_AT_encoding
123	.byte	4                               # DW_AT_byte_size
124	.byte	0                               # End Of Children Mark
125.Ldebug_info_end0:
126	.section	.debug_str,"MS",@progbits,1
127.Linfo_string0:
128	.byte	0                               # string offset=0
129.Linfo_string1:
130	.asciz	"main.c"                        # string offset=1
131.Linfo_string2:
132	.asciz	"/proc/self/cwd"                # string offset=8
133.Linfo_string3:
134	.asciz	"main"                          # string offset=23
135.Linfo_string4:
136	.asciz	"int"                           # string offset=28
137	.section	.GCC.command.line,"MS",@progbits,1
138	.zero	1
139	.ascii	"/usr/local/bin/clang-11 -Qn -g -S -gdwarf-4 main.c -o -"
140	.zero	1
141	.section	.debug_str,"MS",@progbits,1
142	.section	".note.GNU-stack","",@progbits
143	.addrsig
144	.section	.debug_line,"",@progbits
145.Lline_table_start0:
146