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 # Compiled from this C code, with modifications to test multiple file checksums:
8 # static __forceinline void inlinee_2(void) {
13 # static __forceinline void inlinee_1(void) {
25 # CHECK: Inlinee Lines
26 # CHECK: Mod 0000 | `{{.*}}pdb-inlinees.s.tmp.obj`:
27 # CHECK-NEXT: Inlinee | Line | Source File
28 # CHECK-NEXT: 0x1000 | 7 | C:\src\llvm-project\build\t.c (MD5: A79D837C976E9F0463A474D74E2EE9E7)
29 # CHECK-NEXT: 0x1001 | 2 | C:\src\llvm-project\build\file2.h (MD5: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)
38 .intel_syntax noprefix
44 .section .text,"xr",one_only,main
45 .globl main # -- Begin function main
50 .cv_file 1 "C:\\src\\llvm-project\\build\\t.c" "A79D837C976E9F0463A474D74E2EE9E7" 1
51 .cv_file 2 "C:\\src\\llvm-project\\build\\file2.h" "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" 1
52 .cv_loc 0 1 13 0 # t.c:13:0
53 inc dword ptr
[rip
+ x
]
55 .cv_inline_site_id 1 within 0 inlined_at 1 14 0
56 .cv_loc 1 1 8 0 # t.c:8:0
57 inc dword ptr
[rip
+ x
]
59 .cv_inline_site_id 2 within 1 inlined_at 1 9 0
60 .cv_loc 2 2 3 0 # file2.h:3:0
61 inc dword ptr
[rip
+ x
]
62 .cv_loc 2 2 4 0 # file2.h:4:0
64 .cv_loc 2 2 5 0 # file2.h:5:0
65 inc dword ptr
[rip
+ x
]
67 .cv_loc 1 1 10 0 # t.c:10:0
68 inc dword ptr
[rip
+ x
]
70 .cv_loc 0 1 15 0 # t.c:15:0
71 inc dword ptr
[rip
+ x
]
72 .cv_loc 0 1 16 0 # t.c:16:0
73 mov eax
, dword ptr
[rip
+ x
]
79 .section .debug$S,"dr"
81 .long 4 # Debug section magic
83 .long .Ltmp6-.Ltmp5 # Subsection size
85 .short .Ltmp8-.Ltmp7 # Record length
87 .short 4412 # Record kind: S_COMPILE3
88 .long 0 # Flags and language
90 .short 9 # Frontend version
94 .short 9000 # Backend version
98 .asciz "clang version 9.0.0 (git@github.com:llvm/llvm-project.git aa762a56caf3ef2b0b41c501e66d3ef32903a2d0)" # Null-terminated compiler version string
103 .long 246 # Inlinee lines subsection
104 .long .Ltmp10-.Ltmp9 # Subsection size
106 .long 0 # Inlinee lines signature
108 # Inlined function inlinee_1 starts at t.c:7
109 .long 4098 # Type index of inlined function
110 .cv_filechecksumoffset 1 # Offset into filechecksum table
111 .long 7 # Starting line number
113 # Inlined function inlinee_2 starts at file2.h:2
114 .long 4099 # Type index of inlined function
115 .cv_filechecksumoffset 2 # Offset into filechecksum table
116 .long 2 # Starting line number
119 .section .debug$S,"dr",associative,main
121 .long 4 # Debug section magic
122 .long 241 # Symbol subsection for main
123 .long .Ltmp12-.Ltmp11 # Subsection size
125 .short .Ltmp14-.Ltmp13 # Record length
127 .short 4423 # Record kind: S_GPROC32_ID
131 .long .Lfunc_end0-main # Code size
132 .long 0 # Offset after prologue
133 .long 0 # Offset before epilogue
134 .long 4101 # Function type index
135 .secrel32 main # Function section relative address
136 .secidx main # Function section index
138 .asciz "main" # Function name
141 .short .Ltmp16-.Ltmp15 # Record length
143 .short 4114 # Record kind: S_FRAMEPROC
146 .long 0 # Offset of padding
147 .long 0 # Bytes of callee saved registers
148 .long 0 # Exception handler offset
149 .short 0 # Exception handler section
150 .long 0 # Flags (defines frame register)
153 .short .Ltmp18-.Ltmp17 # Record length
155 .short 4429 # Record kind: S_INLINESITE
158 .long 4098 # Inlinee type index
159 .cv_inline_linetable 1 1 7 .Lfunc_begin0 .Lfunc_end0
162 .short .Ltmp20-.Ltmp19 # Record length
164 .short 4429 # Record kind: S_INLINESITE
167 .long 4099 # Inlinee type index
168 .cv_inline_linetable 2 2 2 .Lfunc_begin0 .Lfunc_end0
171 .short 2 # Record length
172 .short 4430 # Record kind: S_INLINESITE_END
173 .short 2 # Record length
174 .short 4430 # Record kind: S_INLINESITE_END
175 .short 2 # Record length
176 .short 4431 # Record kind: S_PROC_ID_END
179 .cv_linetable 0, main, .Lfunc_end0
180 .section .debug$S,"dr"
181 .long 241 # Symbol subsection for globals
182 .long .Ltmp22-.Ltmp21 # Subsection size
184 .short .Ltmp24-.Ltmp23 # Record length
186 .short 4365 # Record kind: S_GDATA32
188 .secrel32 x # DataOffset
195 .cv_filechecksums # File index to string table offset subsection
196 .cv_stringtable # String table
198 .long .Ltmp26-.Ltmp25 # Subsection size
200 .short .Ltmp28-.Ltmp27 # Record length
202 .short 4428 # Record kind: S_BUILDINFO
203 .long 4105 # LF_BUILDINFO index
208 .section .debug$T,"dr"
210 .long 4 # Debug section magic
212 # TypeLeafKind: LF_ARGLIST (0x1201)
217 .byte 0x06, 0x00, 0x01, 0x12
218 .byte 0x00, 0x00, 0x00, 0x00
219 # Procedure (0x1001) {
220 # TypeLeafKind: LF_PROCEDURE (0x1008)
221 # ReturnType: void (0x3)
222 # CallingConvention: NearC (0x0)
223 # FunctionOptions [ (0x0)
226 # ArgListType: () (0x1000)
228 .byte 0x0e, 0x00, 0x08, 0x10
229 .byte 0x03, 0x00, 0x00, 0x00
230 .byte 0x00, 0x00, 0x00, 0x00
231 .byte 0x00, 0x10, 0x00, 0x00
233 # TypeLeafKind: LF_FUNC_ID (0x1601)
235 # FunctionType: void () (0x1001)
238 .byte 0x16, 0x00, 0x01, 0x16
239 .byte 0x00, 0x00, 0x00, 0x00
240 .byte 0x01, 0x10, 0x00, 0x00
241 .byte 0x69, 0x6e, 0x6c, 0x69
242 .byte 0x6e, 0x65, 0x65, 0x5f
243 .byte 0x31, 0x00, 0xf2, 0xf1
245 # TypeLeafKind: LF_FUNC_ID (0x1601)
247 # FunctionType: void () (0x1001)
250 .byte 0x16, 0x00, 0x01, 0x16
251 .byte 0x00, 0x00, 0x00, 0x00
252 .byte 0x01, 0x10, 0x00, 0x00
253 .byte 0x69, 0x6e, 0x6c, 0x69
254 .byte 0x6e, 0x65, 0x65, 0x5f
255 .byte 0x32, 0x00, 0xf2, 0xf1
256 # Procedure (0x1004) {
257 # TypeLeafKind: LF_PROCEDURE (0x1008)
258 # ReturnType: int (0x74)
259 # CallingConvention: NearC (0x0)
260 # FunctionOptions [ (0x0)
263 # ArgListType: () (0x1000)
265 .byte 0x0e, 0x00, 0x08, 0x10
266 .byte 0x74, 0x00, 0x00, 0x00
267 .byte 0x00, 0x00, 0x00, 0x00
268 .byte 0x00, 0x10, 0x00, 0x00
270 # TypeLeafKind: LF_FUNC_ID (0x1601)
272 # FunctionType: int () (0x1004)
275 .byte 0x12, 0x00, 0x01, 0x16
276 .byte 0x00, 0x00, 0x00, 0x00
277 .byte 0x04, 0x10, 0x00, 0x00
278 .byte 0x6d, 0x61, 0x69, 0x6e
279 .byte 0x00, 0xf3, 0xf2, 0xf1
280 # Modifier (0x1006) {
281 # TypeLeafKind: LF_MODIFIER (0x1001)
282 # ModifiedType: int (0x74)
287 .byte 0x0a, 0x00, 0x01, 0x10
288 .byte 0x74, 0x00, 0x00, 0x00
289 .byte 0x02, 0x00, 0xf2, 0xf1
290 # StringId (0x1007) {
291 # TypeLeafKind: LF_STRING_ID (0x1605)
293 # StringData: C:\src\llvm-project\build
295 .byte 0x22, 0x00, 0x05, 0x16
296 .byte 0x00, 0x00, 0x00, 0x00
297 .byte 0x43, 0x3a, 0x5c, 0x73
298 .byte 0x72, 0x63, 0x5c, 0x6c
299 .byte 0x6c, 0x76, 0x6d, 0x2d
300 .byte 0x70, 0x72, 0x6f, 0x6a
301 .byte 0x65, 0x63, 0x74, 0x5c
302 .byte 0x62, 0x75, 0x69, 0x6c
303 .byte 0x64, 0x00, 0xf2, 0xf1
304 # StringId (0x1008) {
305 # TypeLeafKind: LF_STRING_ID (0x1605)
309 .byte 0x0a, 0x00, 0x05, 0x16
310 .byte 0x00, 0x00, 0x00, 0x00
311 .byte 0x74, 0x2e, 0x63, 0x00
312 # BuildInfo (0x1009) {
313 # TypeLeafKind: LF_BUILDINFO (0x1603)
316 # ArgType: C:\src\llvm-project\build (0x1007)
318 # ArgType: t.c (0x1008)
323 .byte 0x1a, 0x00, 0x03, 0x16
324 .byte 0x05, 0x00, 0x07, 0x10
325 .byte 0x00, 0x00, 0x00, 0x00
326 .byte 0x00, 0x00, 0x08, 0x10
327 .byte 0x00, 0x00, 0x00, 0x00
328 .byte 0x00, 0x00, 0x00, 0x00
329 .byte 0x00, 0x00, 0xf2, 0xf1