2 # RUN: llvm-mc -filetype=obj %s -o %t.obj -triple x86_64-windows-msvc
3 # RUN: lld-link -entry:main -nodefaultlib %t.obj -out:%t.exe -pdb:%t.pdb -debug
4 # RUN: llvm-pdbutil dump -il %t.pdb | FileCheck %s
6 # The assembly was hand written to model the following C code. As of this
7 # writing, clang does not emit extra files for inlinees, so it had to be hand
22 # static __forceinline void inlinee_1(void) {
34 # CHECK: Inlinee Lines
35 # CHECK: Mod 0000 | `{{.*}}pdb-inlinees-extrafiles.s.tmp.obj`:
36 # CHECK-NEXT: Inlinee | Line | Source File
37 # CHECK-NEXT: 0x1000 | 7 | C:\src\llvm-project\build\t.c (MD5: A79D837C976E9F0463A474D74E2EE9E7)
38 # CHECK-NEXT: C:\src\llvm-project\build\t1.h (MD5: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)
39 # CHECK-NEXT: C:\src\llvm-project\build\t2.h (MD5: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)
48 .intel_syntax noprefix
54 .section .text,"xr",one_only,main
55 .globl main # -- Begin function main
60 .cv_file 1 "C:\\src\\llvm-project\\build\\t.c" "A79D837C976E9F0463A474D74E2EE9E7" 1
61 .cv_file 2 "C:\\src\\llvm-project\\build\\t1.h" "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" 1
62 .cv_file 3 "C:\\src\\llvm-project\\build\\t2.h" "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" 1
63 .cv_loc 0 1 13 0 # t.c:13:0
64 inc dword ptr
[rip
+ x
]
66 .cv_inline_site_id 1 within 0 inlined_at 1 14 0
67 .cv_loc 1 1 3 0 # t.c:3:0
68 inc dword ptr
[rip
+ x
]
70 .cv_loc 1 2 1 0 # t1.h:1:0
71 inc dword ptr
[rip
+ x
]
72 .cv_loc 1 3 1 0 # t2.h:1:0
73 inc dword ptr
[rip
+ x
]
74 .cv_loc 1 3 2 0 # t2.h:2:0
76 .cv_loc 1 3 3 0 # t2.h:3:0
77 inc dword ptr
[rip
+ x
]
78 .cv_loc 1 2 3 0 # t1.h:3:0
79 inc dword ptr
[rip
+ x
]
81 .cv_loc 1 1 5 0 # t.c:5:0
82 inc dword ptr
[rip
+ x
]
84 .cv_loc 0 1 15 0 # t.c:15:0
85 inc dword ptr
[rip
+ x
]
86 .cv_loc 0 1 16 0 # t.c:16:0
87 mov eax
, dword ptr
[rip
+ x
]
93 .section .debug$S,"dr"
95 .long 4 # Debug section magic
97 .long .Ltmp6-.Ltmp5 # Subsection size
99 .short .Ltmp8-.Ltmp7 # Record length
101 .short 4412 # Record kind: S_COMPILE3
102 .long 0 # Flags and language
104 .short 9 # Frontend version
108 .short 9000 # Backend version
112 .asciz "clang version 9.0.0 (git@github.com:llvm/llvm-project.git aa762a56caf3ef2b0b41c501e66d3ef32903a2d0)" # Null-terminated compiler version string
117 .long 246 # Inlinee lines subsection
118 .long .Ltmp10-.Ltmp9 # Subsection size
120 .long 1 # Inlinee lines signature, extra files
122 # Inlined function inlinee_1 starts at t.c:7
123 .long 4098 # Type index of inlined function
124 .cv_filechecksumoffset 1 # Offset into filechecksum table
125 .long 7 # Starting line number
127 .cv_filechecksumoffset 2 # Offset into filechecksum table
128 .cv_filechecksumoffset 3 # Offset into filechecksum table
132 .section .debug$S,"dr",associative,main
134 .long 4 # Debug section magic
135 .long 241 # Symbol subsection for main
136 .long .Ltmp12-.Ltmp11 # Subsection size
138 .short .Ltmp14-.Ltmp13 # Record length
140 .short 4423 # Record kind: S_GPROC32_ID
144 .long .Lfunc_end0-main # Code size
145 .long 0 # Offset after prologue
146 .long 0 # Offset before epilogue
147 .long 4101 # Function type index
148 .secrel32 main # Function section relative address
149 .secidx main # Function section index
151 .asciz "main" # Function name
154 .short .Ltmp16-.Ltmp15 # Record length
156 .short 4114 # Record kind: S_FRAMEPROC
159 .long 0 # Offset of padding
160 .long 0 # Bytes of callee saved registers
161 .long 0 # Exception handler offset
162 .short 0 # Exception handler section
163 .long 0 # Flags (defines frame register)
166 .short .Ltmp18-.Ltmp17 # Record length
168 .short 4429 # Record kind: S_INLINESITE
171 .long 4098 # Inlinee type index
172 .cv_inline_linetable 1 1 7 .Lfunc_begin0 .Lfunc_end0
175 .short 2 # Record length
176 .short 4430 # Record kind: S_INLINESITE_END
177 .short 2 # Record length
178 .short 4431 # Record kind: S_PROC_ID_END
181 .cv_linetable 0, main, .Lfunc_end0
182 .section .debug$S,"dr"
183 .long 241 # Symbol subsection for globals
184 .long .Ltmp22-.Ltmp21 # Subsection size
186 .short .Ltmp24-.Ltmp23 # Record length
188 .short 4365 # Record kind: S_GDATA32
190 .secrel32 x # DataOffset
197 .cv_filechecksums # File index to string table offset subsection
198 .cv_stringtable # String table
200 .long .Ltmp26-.Ltmp25 # Subsection size
202 .short .Ltmp28-.Ltmp27 # Record length
204 .short 4428 # Record kind: S_BUILDINFO
205 .long 4105 # LF_BUILDINFO index
210 .section .debug$T,"dr"
212 .long 4 # Debug section magic
214 # TypeLeafKind: LF_ARGLIST (0x1201)
219 .byte 0x06, 0x00, 0x01, 0x12
220 .byte 0x00, 0x00, 0x00, 0x00
221 # Procedure (0x1001) {
222 # TypeLeafKind: LF_PROCEDURE (0x1008)
223 # ReturnType: void (0x3)
224 # CallingConvention: NearC (0x0)
225 # FunctionOptions [ (0x0)
228 # ArgListType: () (0x1000)
230 .byte 0x0e, 0x00, 0x08, 0x10
231 .byte 0x03, 0x00, 0x00, 0x00
232 .byte 0x00, 0x00, 0x00, 0x00
233 .byte 0x00, 0x10, 0x00, 0x00
235 # TypeLeafKind: LF_FUNC_ID (0x1601)
237 # FunctionType: void () (0x1001)
240 .byte 0x16, 0x00, 0x01, 0x16
241 .byte 0x00, 0x00, 0x00, 0x00
242 .byte 0x01, 0x10, 0x00, 0x00
243 .byte 0x69, 0x6e, 0x6c, 0x69
244 .byte 0x6e, 0x65, 0x65, 0x5f
245 .byte 0x31, 0x00, 0xf2, 0xf1
247 # TypeLeafKind: LF_FUNC_ID (0x1601)
249 # FunctionType: void () (0x1001)
252 .byte 0x16, 0x00, 0x01, 0x16
253 .byte 0x00, 0x00, 0x00, 0x00
254 .byte 0x01, 0x10, 0x00, 0x00
255 .byte 0x69, 0x6e, 0x6c, 0x69
256 .byte 0x6e, 0x65, 0x65, 0x5f
257 .byte 0x32, 0x00, 0xf2, 0xf1
258 # Procedure (0x1004) {
259 # TypeLeafKind: LF_PROCEDURE (0x1008)
260 # ReturnType: int (0x74)
261 # CallingConvention: NearC (0x0)
262 # FunctionOptions [ (0x0)
265 # ArgListType: () (0x1000)
267 .byte 0x0e, 0x00, 0x08, 0x10
268 .byte 0x74, 0x00, 0x00, 0x00
269 .byte 0x00, 0x00, 0x00, 0x00
270 .byte 0x00, 0x10, 0x00, 0x00
272 # TypeLeafKind: LF_FUNC_ID (0x1601)
274 # FunctionType: int () (0x1004)
277 .byte 0x12, 0x00, 0x01, 0x16
278 .byte 0x00, 0x00, 0x00, 0x00
279 .byte 0x04, 0x10, 0x00, 0x00
280 .byte 0x6d, 0x61, 0x69, 0x6e
281 .byte 0x00, 0xf3, 0xf2, 0xf1
282 # Modifier (0x1006) {
283 # TypeLeafKind: LF_MODIFIER (0x1001)
284 # ModifiedType: int (0x74)
289 .byte 0x0a, 0x00, 0x01, 0x10
290 .byte 0x74, 0x00, 0x00, 0x00
291 .byte 0x02, 0x00, 0xf2, 0xf1
292 # StringId (0x1007) {
293 # TypeLeafKind: LF_STRING_ID (0x1605)
295 # StringData: C:\src\llvm-project\build
297 .byte 0x22, 0x00, 0x05, 0x16
298 .byte 0x00, 0x00, 0x00, 0x00
299 .byte 0x43, 0x3a, 0x5c, 0x73
300 .byte 0x72, 0x63, 0x5c, 0x6c
301 .byte 0x6c, 0x76, 0x6d, 0x2d
302 .byte 0x70, 0x72, 0x6f, 0x6a
303 .byte 0x65, 0x63, 0x74, 0x5c
304 .byte 0x62, 0x75, 0x69, 0x6c
305 .byte 0x64, 0x00, 0xf2, 0xf1
306 # StringId (0x1008) {
307 # TypeLeafKind: LF_STRING_ID (0x1605)
311 .byte 0x0a, 0x00, 0x05, 0x16
312 .byte 0x00, 0x00, 0x00, 0x00
313 .byte 0x74, 0x2e, 0x63, 0x00
314 # BuildInfo (0x1009) {
315 # TypeLeafKind: LF_BUILDINFO (0x1603)
318 # ArgType: C:\src\llvm-project\build (0x1007)
320 # ArgType: t.c (0x1008)
325 .byte 0x1a, 0x00, 0x03, 0x16
326 .byte 0x05, 0x00, 0x07, 0x10
327 .byte 0x00, 0x00, 0x00, 0x00
328 .byte 0x00, 0x00, 0x08, 0x10
329 .byte 0x00, 0x00, 0x00, 0x00
330 .byte 0x00, 0x00, 0x00, 0x00
331 .byte 0x00, 0x00, 0xf2, 0xf1