333 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj %s -o %t.obj -triple x86_64-windows-msvc3# RUN: lld-link -entry:main -nodefaultlib %t.obj -out:%t.exe -pdb:%t.pdb -debug4# RUN: llvm-pdbutil dump -il %t.pdb | FileCheck %s5 6# Compiled from this C code, with modifications to test multiple file checksums:7# volatile int x;8# static __forceinline void inlinee_2(void) {9# ++x;10# __debugbreak();11# ++x;12# }13# static __forceinline void inlinee_1(void) {14# ++x;15# inlinee_2();16# ++x;17# }18# int main() {19# ++x;20# inlinee_1();21# ++x;22# return x;23# }24 25# CHECK: Inlinee Lines26# CHECK: Mod 0000 | `{{.*}}pdb-inlinees.s.tmp.obj`:27# CHECK-NEXT: Inlinee | Line | Source File28# 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)30 31 .text32 .def @feat.00;33 .scl 3;34 .type 0;35 .endef36 .globl @feat.0037.set @feat.00, 038 .intel_syntax noprefix39 .file "t.c"40 .def main;41 .scl 2;42 .type 32;43 .endef44 .section .text,"xr",one_only,main45 .globl main # -- Begin function main46main: # @main47.Lfunc_begin0:48 .cv_func_id 049# %bb.0: # %entry50 .cv_file 1 "C:\\src\\llvm-project\\build\\t.c" "A79D837C976E9F0463A474D74E2EE9E7" 151 .cv_file 2 "C:\\src\\llvm-project\\build\\file2.h" "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" 152 .cv_loc 0 1 13 0 # t.c:13:053 inc dword ptr [rip + x]54.Ltmp0:55 .cv_inline_site_id 1 within 0 inlined_at 1 14 056 .cv_loc 1 1 8 0 # t.c:8:057 inc dword ptr [rip + x]58.Ltmp1:59 .cv_inline_site_id 2 within 1 inlined_at 1 9 060 .cv_loc 2 2 3 0 # file2.h:3:061 inc dword ptr [rip + x]62 .cv_loc 2 2 4 0 # file2.h:4:063 int364 .cv_loc 2 2 5 0 # file2.h:5:065 inc dword ptr [rip + x]66.Ltmp2:67 .cv_loc 1 1 10 0 # t.c:10:068 inc dword ptr [rip + x]69.Ltmp3:70 .cv_loc 0 1 15 0 # t.c:15:071 inc dword ptr [rip + x]72 .cv_loc 0 1 16 0 # t.c:16:073 mov eax, dword ptr [rip + x]74 ret75.Ltmp4:76.Lfunc_end0:77 # -- End function78 .comm x,4,2 # @x79 .section .debug$S,"dr"80 .p2align 281 .long 4 # Debug section magic82 .long 24183 .long .Ltmp6-.Ltmp5 # Subsection size84.Ltmp5:85 .short .Ltmp8-.Ltmp7 # Record length86.Ltmp7:87 .short 4412 # Record kind: S_COMPILE388 .long 0 # Flags and language89 .short 208 # CPUType90 .short 9 # Frontend version91 .short 092 .short 093 .short 094 .short 9000 # Backend version95 .short 096 .short 097 .short 098 .asciz "clang version 9.0.0 (git@github.com:llvm/llvm-project.git aa762a56caf3ef2b0b41c501e66d3ef32903a2d0)" # Null-terminated compiler version string99 .p2align 2100.Ltmp8:101.Ltmp6:102 .p2align 2103 .long 246 # Inlinee lines subsection104 .long .Ltmp10-.Ltmp9 # Subsection size105.Ltmp9:106 .long 0 # Inlinee lines signature107 108 # Inlined function inlinee_1 starts at t.c:7109 .long 4098 # Type index of inlined function110 .cv_filechecksumoffset 1 # Offset into filechecksum table111 .long 7 # Starting line number112 113 # Inlined function inlinee_2 starts at file2.h:2114 .long 4099 # Type index of inlined function115 .cv_filechecksumoffset 2 # Offset into filechecksum table116 .long 2 # Starting line number117.Ltmp10:118 .p2align 2119 .section .debug$S,"dr",associative,main120 .p2align 2121 .long 4 # Debug section magic122 .long 241 # Symbol subsection for main123 .long .Ltmp12-.Ltmp11 # Subsection size124.Ltmp11:125 .short .Ltmp14-.Ltmp13 # Record length126.Ltmp13:127 .short 4423 # Record kind: S_GPROC32_ID128 .long 0 # PtrParent129 .long 0 # PtrEnd130 .long 0 # PtrNext131 .long .Lfunc_end0-main # Code size132 .long 0 # Offset after prologue133 .long 0 # Offset before epilogue134 .long 4101 # Function type index135 .secrel32 main # Function section relative address136 .secidx main # Function section index137 .byte 0 # Flags138 .asciz "main" # Function name139 .p2align 2140.Ltmp14:141 .short .Ltmp16-.Ltmp15 # Record length142.Ltmp15:143 .short 4114 # Record kind: S_FRAMEPROC144 .long 0 # FrameSize145 .long 0 # Padding146 .long 0 # Offset of padding147 .long 0 # Bytes of callee saved registers148 .long 0 # Exception handler offset149 .short 0 # Exception handler section150 .long 0 # Flags (defines frame register)151 .p2align 2152.Ltmp16:153 .short .Ltmp18-.Ltmp17 # Record length154.Ltmp17:155 .short 4429 # Record kind: S_INLINESITE156 .long 0 # PtrParent157 .long 0 # PtrEnd158 .long 4098 # Inlinee type index159 .cv_inline_linetable 1 1 7 .Lfunc_begin0 .Lfunc_end0160 .p2align 2161.Ltmp18:162 .short .Ltmp20-.Ltmp19 # Record length163.Ltmp19:164 .short 4429 # Record kind: S_INLINESITE165 .long 0 # PtrParent166 .long 0 # PtrEnd167 .long 4099 # Inlinee type index168 .cv_inline_linetable 2 2 2 .Lfunc_begin0 .Lfunc_end0169 .p2align 2170.Ltmp20:171 .short 2 # Record length172 .short 4430 # Record kind: S_INLINESITE_END173 .short 2 # Record length174 .short 4430 # Record kind: S_INLINESITE_END175 .short 2 # Record length176 .short 4431 # Record kind: S_PROC_ID_END177.Ltmp12:178 .p2align 2179 .cv_linetable 0, main, .Lfunc_end0180 .section .debug$S,"dr"181 .long 241 # Symbol subsection for globals182 .long .Ltmp22-.Ltmp21 # Subsection size183.Ltmp21:184 .short .Ltmp24-.Ltmp23 # Record length185.Ltmp23:186 .short 4365 # Record kind: S_GDATA32187 .long 4102 # Type188 .secrel32 x # DataOffset189 .secidx x # Segment190 .asciz "x" # Name191 .p2align 2192.Ltmp24:193.Ltmp22:194 .p2align 2195 .cv_filechecksums # File index to string table offset subsection196 .cv_stringtable # String table197 .long 241198 .long .Ltmp26-.Ltmp25 # Subsection size199.Ltmp25:200 .short .Ltmp28-.Ltmp27 # Record length201.Ltmp27:202 .short 4428 # Record kind: S_BUILDINFO203 .long 4105 # LF_BUILDINFO index204 .p2align 2205.Ltmp28:206.Ltmp26:207 .p2align 2208 .section .debug$T,"dr"209 .p2align 2210 .long 4 # Debug section magic211 # ArgList (0x1000) {212 # TypeLeafKind: LF_ARGLIST (0x1201)213 # NumArgs: 0214 # Arguments [215 # ]216 # }217 .byte 0x06, 0x00, 0x01, 0x12218 .byte 0x00, 0x00, 0x00, 0x00219 # Procedure (0x1001) {220 # TypeLeafKind: LF_PROCEDURE (0x1008)221 # ReturnType: void (0x3)222 # CallingConvention: NearC (0x0)223 # FunctionOptions [ (0x0)224 # ]225 # NumParameters: 0226 # ArgListType: () (0x1000)227 # }228 .byte 0x0e, 0x00, 0x08, 0x10229 .byte 0x03, 0x00, 0x00, 0x00230 .byte 0x00, 0x00, 0x00, 0x00231 .byte 0x00, 0x10, 0x00, 0x00232 # FuncId (0x1002) {233 # TypeLeafKind: LF_FUNC_ID (0x1601)234 # ParentScope: 0x0235 # FunctionType: void () (0x1001)236 # Name: inlinee_1237 # }238 .byte 0x16, 0x00, 0x01, 0x16239 .byte 0x00, 0x00, 0x00, 0x00240 .byte 0x01, 0x10, 0x00, 0x00241 .byte 0x69, 0x6e, 0x6c, 0x69242 .byte 0x6e, 0x65, 0x65, 0x5f243 .byte 0x31, 0x00, 0xf2, 0xf1244 # FuncId (0x1003) {245 # TypeLeafKind: LF_FUNC_ID (0x1601)246 # ParentScope: 0x0247 # FunctionType: void () (0x1001)248 # Name: inlinee_2249 # }250 .byte 0x16, 0x00, 0x01, 0x16251 .byte 0x00, 0x00, 0x00, 0x00252 .byte 0x01, 0x10, 0x00, 0x00253 .byte 0x69, 0x6e, 0x6c, 0x69254 .byte 0x6e, 0x65, 0x65, 0x5f255 .byte 0x32, 0x00, 0xf2, 0xf1256 # Procedure (0x1004) {257 # TypeLeafKind: LF_PROCEDURE (0x1008)258 # ReturnType: int (0x74)259 # CallingConvention: NearC (0x0)260 # FunctionOptions [ (0x0)261 # ]262 # NumParameters: 0263 # ArgListType: () (0x1000)264 # }265 .byte 0x0e, 0x00, 0x08, 0x10266 .byte 0x74, 0x00, 0x00, 0x00267 .byte 0x00, 0x00, 0x00, 0x00268 .byte 0x00, 0x10, 0x00, 0x00269 # FuncId (0x1005) {270 # TypeLeafKind: LF_FUNC_ID (0x1601)271 # ParentScope: 0x0272 # FunctionType: int () (0x1004)273 # Name: main274 # }275 .byte 0x12, 0x00, 0x01, 0x16276 .byte 0x00, 0x00, 0x00, 0x00277 .byte 0x04, 0x10, 0x00, 0x00278 .byte 0x6d, 0x61, 0x69, 0x6e279 .byte 0x00, 0xf3, 0xf2, 0xf1280 # Modifier (0x1006) {281 # TypeLeafKind: LF_MODIFIER (0x1001)282 # ModifiedType: int (0x74)283 # Modifiers [ (0x2)284 # Volatile (0x2)285 # ]286 # }287 .byte 0x0a, 0x00, 0x01, 0x10288 .byte 0x74, 0x00, 0x00, 0x00289 .byte 0x02, 0x00, 0xf2, 0xf1290 # StringId (0x1007) {291 # TypeLeafKind: LF_STRING_ID (0x1605)292 # Id: 0x0293 # StringData: C:\src\llvm-project\build294 # }295 .byte 0x22, 0x00, 0x05, 0x16296 .byte 0x00, 0x00, 0x00, 0x00297 .byte 0x43, 0x3a, 0x5c, 0x73298 .byte 0x72, 0x63, 0x5c, 0x6c299 .byte 0x6c, 0x76, 0x6d, 0x2d300 .byte 0x70, 0x72, 0x6f, 0x6a301 .byte 0x65, 0x63, 0x74, 0x5c302 .byte 0x62, 0x75, 0x69, 0x6c303 .byte 0x64, 0x00, 0xf2, 0xf1304 # StringId (0x1008) {305 # TypeLeafKind: LF_STRING_ID (0x1605)306 # Id: 0x0307 # StringData: t.c308 # }309 .byte 0x0a, 0x00, 0x05, 0x16310 .byte 0x00, 0x00, 0x00, 0x00311 .byte 0x74, 0x2e, 0x63, 0x00312 # BuildInfo (0x1009) {313 # TypeLeafKind: LF_BUILDINFO (0x1603)314 # NumArgs: 5315 # Arguments [316 # ArgType: C:\src\llvm-project\build (0x1007)317 # ArgType: 0x0318 # ArgType: t.c (0x1008)319 # ArgType: 0x0320 # ArgType: 0x0321 # ]322 # }323 .byte 0x1a, 0x00, 0x03, 0x16324 .byte 0x05, 0x00, 0x07, 0x10325 .byte 0x00, 0x00, 0x00, 0x00326 .byte 0x00, 0x00, 0x08, 0x10327 .byte 0x00, 0x00, 0x00, 0x00328 .byte 0x00, 0x00, 0x00, 0x00329 .byte 0x00, 0x00, 0xf2, 0xf1330 331 .addrsig332 .addrsig_sym x333