1 # RUN: llvm-mc -triple x86_64-windows-msvc %s -filetype=obj -o %t.o
2 # RUN: llvm-pdbutil dump -symbols %t.o | FileCheck %s
4 # We used to have a label flushing bug down below by the "BUG" comments that
5 # would cause the S_DEFRANGE_FRAMEPOINTER_REL records to appear missing. In
6 # practice, the label would extend past the def range, so it would appear that
7 # every local was optimized out or had no def ranges.
9 # CHECK: S_GPROC32_ID {{.*}} `max`
10 # CHECK: S_LOCAL [size = {{.*}}] `a`
11 # CHECK: S_DEFRANGE_FRAMEPOINTER_REL
12 # CHECK: S_LOCAL [size = {{.*}}] `b`
13 # CHECK: S_DEFRANGE_FRAMEPOINTER_REL
26 .globl max # -- Begin function max
31 .cv_file 1 "C:\\src\\llvm-project\\build\\t.c" "44649E6EBC4FC8880991A1AF1F2D2990" 1
32 .cv_loc 0 1 1 0 # t.c:1:0
41 .cv_loc 0 1 2 0 # t.c:2:0
48 .LBB0_2: # %cond.false
59 .section .debug$S,"dr"
62 .long 241 # Symbol subsection for max
63 .long .Ltmp7-.Ltmp6 # Subsection size
65 .short .Ltmp9-.Ltmp8 # Record length
67 .short 4423 # Record kind: S_GPROC32_ID
71 .long .Lfunc_end0-max # Code size
72 .long 0 # Offset after prologue
73 .long 0 # Offset before epilogue
74 .long 4098 # Function type index
75 .secrel32 max # Function section relative address
76 .secidx max # Function section index
78 .asciz "max" # Function name
80 .short .Ltmp11-.Ltmp10 # Record length
82 .short 4114 # Record kind: S_FRAMEPROC
85 .long 0 # Offset of padding
86 .long 0 # Bytes of callee saved registers
87 .long 0 # Exception handler offset
88 .short 0 # Exception handler section
89 .long 81920 # Flags (defines frame register)
91 .short .Ltmp13-.Ltmp12 # Record length
93 .short 4414 # Record kind: S_LOCAL
100 .cv_def_range .Ltmp0 .Ltmp1, "B\021\000\000\000\000"
101 .short .Ltmp15-.Ltmp14 # Record length
103 .short 4414 # Record kind: S_LOCAL
110 .cv_def_range .Ltmp0 .Ltmp1, "B\021\004\000\000\000"
111 .short 2 # Record length
112 .short 4431 # Record kind: S_PROC_ID_END
115 .cv_linetable 0, max, .Lfunc_end0
116 .cv_filechecksums # File index to string table offset subsection
117 .cv_stringtable # String table
119 .long .Ltmp17-.Ltmp16 # Subsection size
123 .section .debug$T,"dr"
125 .long 4 # Debug section magic
127 # TypeLeafKind: LF_ARGLIST (0x1201)
130 # ArgType: long (0x12)
131 # ArgType: long (0x12)
134 .byte 0x0e, 0x00, 0x01, 0x12
135 .byte 0x02, 0x00, 0x00, 0x00
136 .byte 0x12, 0x00, 0x00, 0x00
137 .byte 0x12, 0x00, 0x00, 0x00
138 # Procedure (0x1001) {
139 # TypeLeafKind: LF_PROCEDURE (0x1008)
140 # ReturnType: long (0x12)
141 # CallingConvention: NearC (0x0)
142 # FunctionOptions [ (0x0)
145 # ArgListType: (long, long) (0x1000)
147 .byte 0x0e, 0x00, 0x08, 0x10
148 .byte 0x12, 0x00, 0x00, 0x00
149 .byte 0x00, 0x00, 0x02, 0x00
150 .byte 0x00, 0x10, 0x00, 0x00
152 # TypeLeafKind: LF_FUNC_ID (0x1601)
154 # FunctionType: long (long, long) (0x1001)
157 .byte 0x0e, 0x00, 0x01, 0x16
158 .byte 0x00, 0x00, 0x00, 0x00
159 .byte 0x01, 0x10, 0x00, 0x00
160 .byte 0x6d, 0x61, 0x78, 0x00