Revert "CodeGen][NewPM] Port MachineScheduler to NPM. (#125703)" (#126268)
[llvm-project.git] / llvm / test / ExecutionEngine / JITLink / x86-64 / MachO-check-dwarf-filename.s
blob81ea18f2493406547171078474b08663875fcf7c
1 # RUN: llvm-mc -triple=x86_64-apple-macosx10.9 -filetype=obj -o %t.o %s
2 # RUN: llvm-jitlink -num-threads=0 -debug-only=orc -noexec -debugger-support \
3 # RUN: %t.o 2>&1 \
4 # RUN: | FileCheck %s
6 # REQUIRES: asserts && system-darwin
8 # Test that source file names can be indentified from DWARF line tables.
10 # CHECK: Using FileName = "check-dwarf-filename.c" from DWARF line table
12 .section __TEXT,__text,regular,pure_instructions
13 .build_version macos, 15, 0 sdk_version 15, 0
14 .globl _main ## -- Begin function main
15 .p2align 4, 0x90
16 _main: ## @main
17 Lfunc_begin0:
18 .file 0 "/Users/lhames/Projects/scratch" "check-dwarf-filename.c" md5 0x331a6c7ae0cfcd2896eca60ac6f5703e
19 .loc 0 1 0 ## check-dwarf-filename.c:1:0
20 .cfi_startproc
21 ## %bb.0:
22 ##DEBUG_VALUE: main:argc <- $edi
23 ##DEBUG_VALUE: main:argv <- $rsi
24 pushq %rbp
25 .cfi_def_cfa_offset 16
26 .cfi_offset %rbp, -16
27 movq %rsp, %rbp
28 .cfi_def_cfa_register %rbp
29 Ltmp0:
30 .loc 0 2 3 prologue_end ## check-dwarf-filename.c:2:3
31 xorl %eax, %eax
32 .loc 0 2 3 epilogue_begin is_stmt 0 ## check-dwarf-filename.c:2:3
33 popq %rbp
34 retq
35 Ltmp1:
36 Lfunc_end0:
37 .cfi_endproc
38 ## -- End function
39 .section __DWARF,__debug_abbrev,regular,debug
40 Lsection_abbrev:
41 .byte 1 ## Abbreviation Code
42 .byte 17 ## DW_TAG_compile_unit
43 .byte 1 ## DW_CHILDREN_yes
44 .byte 37 ## DW_AT_producer
45 .byte 37 ## DW_FORM_strx1
46 .byte 19 ## DW_AT_language
47 .byte 5 ## DW_FORM_data2
48 .byte 3 ## DW_AT_name
49 .byte 37 ## DW_FORM_strx1
50 .ascii "\202|" ## DW_AT_LLVM_sysroot
51 .byte 37 ## DW_FORM_strx1
52 .ascii "\357\177" ## DW_AT_APPLE_sdk
53 .byte 37 ## DW_FORM_strx1
54 .byte 114 ## DW_AT_str_offsets_base
55 .byte 23 ## DW_FORM_sec_offset
56 .byte 16 ## DW_AT_stmt_list
57 .byte 23 ## DW_FORM_sec_offset
58 .byte 27 ## DW_AT_comp_dir
59 .byte 37 ## DW_FORM_strx1
60 .ascii "\341\177" ## DW_AT_APPLE_optimized
61 .byte 25 ## DW_FORM_flag_present
62 .byte 17 ## DW_AT_low_pc
63 .byte 27 ## DW_FORM_addrx
64 .byte 18 ## DW_AT_high_pc
65 .byte 6 ## DW_FORM_data4
66 .byte 115 ## DW_AT_addr_base
67 .byte 23 ## DW_FORM_sec_offset
68 .byte 0 ## EOM(1)
69 .byte 0 ## EOM(2)
70 .byte 2 ## Abbreviation Code
71 .byte 46 ## DW_TAG_subprogram
72 .byte 1 ## DW_CHILDREN_yes
73 .byte 17 ## DW_AT_low_pc
74 .byte 27 ## DW_FORM_addrx
75 .byte 18 ## DW_AT_high_pc
76 .byte 6 ## DW_FORM_data4
77 .byte 64 ## DW_AT_frame_base
78 .byte 24 ## DW_FORM_exprloc
79 .byte 122 ## DW_AT_call_all_calls
80 .byte 25 ## DW_FORM_flag_present
81 .byte 3 ## DW_AT_name
82 .byte 37 ## DW_FORM_strx1
83 .byte 58 ## DW_AT_decl_file
84 .byte 11 ## DW_FORM_data1
85 .byte 59 ## DW_AT_decl_line
86 .byte 11 ## DW_FORM_data1
87 .byte 39 ## DW_AT_prototyped
88 .byte 25 ## DW_FORM_flag_present
89 .byte 73 ## DW_AT_type
90 .byte 19 ## DW_FORM_ref4
91 .byte 63 ## DW_AT_external
92 .byte 25 ## DW_FORM_flag_present
93 .ascii "\341\177" ## DW_AT_APPLE_optimized
94 .byte 25 ## DW_FORM_flag_present
95 .byte 0 ## EOM(1)
96 .byte 0 ## EOM(2)
97 .byte 3 ## Abbreviation Code
98 .byte 5 ## DW_TAG_formal_parameter
99 .byte 0 ## DW_CHILDREN_no
100 .byte 2 ## DW_AT_location
101 .byte 24 ## DW_FORM_exprloc
102 .byte 3 ## DW_AT_name
103 .byte 37 ## DW_FORM_strx1
104 .byte 58 ## DW_AT_decl_file
105 .byte 11 ## DW_FORM_data1
106 .byte 59 ## DW_AT_decl_line
107 .byte 11 ## DW_FORM_data1
108 .byte 73 ## DW_AT_type
109 .byte 19 ## DW_FORM_ref4
110 .byte 0 ## EOM(1)
111 .byte 0 ## EOM(2)
112 .byte 4 ## Abbreviation Code
113 .byte 36 ## DW_TAG_base_type
114 .byte 0 ## DW_CHILDREN_no
115 .byte 3 ## DW_AT_name
116 .byte 37 ## DW_FORM_strx1
117 .byte 62 ## DW_AT_encoding
118 .byte 11 ## DW_FORM_data1
119 .byte 11 ## DW_AT_byte_size
120 .byte 11 ## DW_FORM_data1
121 .byte 0 ## EOM(1)
122 .byte 0 ## EOM(2)
123 .byte 5 ## Abbreviation Code
124 .byte 15 ## DW_TAG_pointer_type
125 .byte 0 ## DW_CHILDREN_no
126 .byte 73 ## DW_AT_type
127 .byte 19 ## DW_FORM_ref4
128 .byte 0 ## EOM(1)
129 .byte 0 ## EOM(2)
130 .byte 0 ## EOM(3)
131 .section __DWARF,__debug_info,regular,debug
132 Lsection_info:
133 Lcu_begin0:
134 .set Lset0, Ldebug_info_end0-Ldebug_info_start0 ## Length of Unit
135 .long Lset0
136 Ldebug_info_start0:
137 .short 5 ## DWARF version number
138 .byte 1 ## DWARF Unit Type
139 .byte 8 ## Address Size (in bytes)
140 .set Lset1, Lsection_abbrev-Lsection_abbrev ## Offset Into Abbrev. Section
141 .long Lset1
142 .byte 1 ## Abbrev [1] 0xc:0x50 DW_TAG_compile_unit
143 .byte 0 ## DW_AT_producer
144 .short 29 ## DW_AT_language
145 .byte 1 ## DW_AT_name
146 .byte 2 ## DW_AT_LLVM_sysroot
147 .byte 3 ## DW_AT_APPLE_sdk
148 .set Lset2, Lstr_offsets_base0-Lsection_str_off ## DW_AT_str_offsets_base
149 .long Lset2
150 .set Lset3, Lline_table_start0-Lsection_line ## DW_AT_stmt_list
151 .long Lset3
152 .byte 4 ## DW_AT_comp_dir
153 ## DW_AT_APPLE_optimized
154 .byte 0 ## DW_AT_low_pc
155 .set Lset4, Lfunc_end0-Lfunc_begin0 ## DW_AT_high_pc
156 .long Lset4
157 .set Lset5, Laddr_table_base0-Lsection_info0 ## DW_AT_addr_base
158 .long Lset5
159 .byte 2 ## Abbrev [2] 0x25:0x24 DW_TAG_subprogram
160 .byte 0 ## DW_AT_low_pc
161 .set Lset6, Lfunc_end0-Lfunc_begin0 ## DW_AT_high_pc
162 .long Lset6
163 .byte 1 ## DW_AT_frame_base
164 .byte 86
165 ## DW_AT_call_all_calls
166 .byte 5 ## DW_AT_name
167 .byte 0 ## DW_AT_decl_file
168 .byte 1 ## DW_AT_decl_line
169 ## DW_AT_prototyped
170 .long 73 ## DW_AT_type
171 ## DW_AT_external
172 ## DW_AT_APPLE_optimized
173 .byte 3 ## Abbrev [3] 0x34:0xa DW_TAG_formal_parameter
174 .byte 1 ## DW_AT_location
175 .byte 85
176 .byte 7 ## DW_AT_name
177 .byte 0 ## DW_AT_decl_file
178 .byte 1 ## DW_AT_decl_line
179 .long 73 ## DW_AT_type
180 .byte 3 ## Abbrev [3] 0x3e:0xa DW_TAG_formal_parameter
181 .byte 1 ## DW_AT_location
182 .byte 84
183 .byte 8 ## DW_AT_name
184 .byte 0 ## DW_AT_decl_file
185 .byte 1 ## DW_AT_decl_line
186 .long 77 ## DW_AT_type
187 .byte 0 ## End Of Children Mark
188 .byte 4 ## Abbrev [4] 0x49:0x4 DW_TAG_base_type
189 .byte 6 ## DW_AT_name
190 .byte 5 ## DW_AT_encoding
191 .byte 4 ## DW_AT_byte_size
192 .byte 5 ## Abbrev [5] 0x4d:0x5 DW_TAG_pointer_type
193 .long 82 ## DW_AT_type
194 .byte 5 ## Abbrev [5] 0x52:0x5 DW_TAG_pointer_type
195 .long 87 ## DW_AT_type
196 .byte 4 ## Abbrev [4] 0x57:0x4 DW_TAG_base_type
197 .byte 9 ## DW_AT_name
198 .byte 6 ## DW_AT_encoding
199 .byte 1 ## DW_AT_byte_size
200 .byte 0 ## End Of Children Mark
201 Ldebug_info_end0:
202 .section __DWARF,__debug_str_offs,regular,debug
203 Lsection_str_off:
204 .long 44 ## Length of String Offsets Set
205 .short 5
206 .short 0
207 Lstr_offsets_base0:
208 .section __DWARF,__debug_str,regular,debug
209 Linfo_string:
210 .asciz "Apple clang version 16.0.0 (clang-1600.0.26.3)" ## string offset=0
211 .asciz "check-dwarf-filename.c" ## string offset=47
212 .asciz "/Library/Developer/CommandLineTools/SDKs/MacOSX15.0.sdk" ## string offset=70
213 .asciz "MacOSX15.0.sdk" ## string offset=126
214 .asciz "/Users/lhames/Projects/scratch" ## string offset=141
215 .asciz "main" ## string offset=172
216 .asciz "int" ## string offset=177
217 .asciz "argc" ## string offset=181
218 .asciz "argv" ## string offset=186
219 .asciz "char" ## string offset=191
220 .section __DWARF,__debug_str_offs,regular,debug
221 .long 0
222 .long 47
223 .long 70
224 .long 126
225 .long 141
226 .long 172
227 .long 177
228 .long 181
229 .long 186
230 .long 191
231 .section __DWARF,__debug_addr,regular,debug
232 Lsection_info0:
233 .set Lset7, Ldebug_addr_end0-Ldebug_addr_start0 ## Length of contribution
234 .long Lset7
235 Ldebug_addr_start0:
236 .short 5 ## DWARF version number
237 .byte 8 ## Address size
238 .byte 0 ## Segment selector size
239 Laddr_table_base0:
240 .quad Lfunc_begin0
241 Ldebug_addr_end0:
242 .section __DWARF,__debug_names,regular,debug
243 Ldebug_names_begin:
244 .set Lset8, Lnames_end0-Lnames_start0 ## Header: unit length
245 .long Lset8
246 Lnames_start0:
247 .short 5 ## Header: version
248 .short 0 ## Header: padding
249 .long 1 ## Header: compilation unit count
250 .long 0 ## Header: local type unit count
251 .long 0 ## Header: foreign type unit count
252 .long 3 ## Header: bucket count
253 .long 3 ## Header: name count
254 .set Lset9, Lnames_abbrev_end0-Lnames_abbrev_start0 ## Header: abbreviation table size
255 .long Lset9
256 .long 8 ## Header: augmentation string size
257 .ascii "LLVM0700" ## Header: augmentation string
258 .set Lset10, Lcu_begin0-Lsection_info ## Compilation unit 0
259 .long Lset10
260 .long 0 ## Bucket 0
261 .long 1 ## Bucket 1
262 .long 2 ## Bucket 2
263 .long 2090499946 ## Hash in Bucket 1
264 .long 193495088 ## Hash in Bucket 2
265 .long 2090147939 ## Hash in Bucket 2
266 .long 172 ## String in Bucket 1: main
267 .long 177 ## String in Bucket 2: int
268 .long 191 ## String in Bucket 2: char
269 .set Lset11, Lnames0-Lnames_entries0 ## Offset in Bucket 1
270 .long Lset11
271 .set Lset12, Lnames1-Lnames_entries0 ## Offset in Bucket 2
272 .long Lset12
273 .set Lset13, Lnames2-Lnames_entries0 ## Offset in Bucket 2
274 .long Lset13
275 Lnames_abbrev_start0:
276 .ascii "\230." ## Abbrev code
277 .byte 46 ## DW_TAG_subprogram
278 .byte 3 ## DW_IDX_die_offset
279 .byte 19 ## DW_FORM_ref4
280 .byte 4 ## DW_IDX_parent
281 .byte 25 ## DW_FORM_flag_present
282 .byte 0 ## End of abbrev
283 .byte 0 ## End of abbrev
284 .ascii "\230$" ## Abbrev code
285 .byte 36 ## DW_TAG_base_type
286 .byte 3 ## DW_IDX_die_offset
287 .byte 19 ## DW_FORM_ref4
288 .byte 4 ## DW_IDX_parent
289 .byte 25 ## DW_FORM_flag_present
290 .byte 0 ## End of abbrev
291 .byte 0 ## End of abbrev
292 .byte 0 ## End of abbrev list
293 Lnames_abbrev_end0:
294 Lnames_entries0:
295 Lnames0:
297 .ascii "\230." ## Abbreviation code
298 .long 37 ## DW_IDX_die_offset
299 .byte 0 ## DW_IDX_parent
300 ## End of list: main
301 Lnames1:
303 .ascii "\230$" ## Abbreviation code
304 .long 73 ## DW_IDX_die_offset
305 .byte 0 ## DW_IDX_parent
306 ## End of list: int
307 Lnames2:
309 .ascii "\230$" ## Abbreviation code
310 .long 87 ## DW_IDX_die_offset
311 .byte 0 ## DW_IDX_parent
312 ## End of list: char
313 .p2align 2, 0x0
314 Lnames_end0:
315 .subsections_via_symbols
316 .section __DWARF,__debug_line,regular,debug
317 Lsection_line:
318 Lline_table_start0: