1 # RUN: llvm-mc < %s -triple=i686-pc-win32 -filetype=obj | llvm-readobj - -codeview | FileCheck %s
3 # Original source, slightly modified with an extra .cv_loc directive (at EXTRA
4 # below) that was causing assertions:
6 # void __declspec(noreturn) __declspec(dllimport) exit(int);
8 # static inline void do_exit() {
17 # CHECK-LABEL: InlineeSourceLine {
18 # CHECK: Inlinee: do_exit (0x1002)
19 # CHECK: FileID: C:\src\llvm-project\build\t.cpp (0x0)
20 # CHECK: SourceLineNum: 3
23 # CHECK-LABEL: InlineSiteSym {
24 # CHECK: Kind: S_INLINESITE (0x114D)
25 # CHECK: Inlinee: do_exit (0x1002)
26 # CHECK: BinaryAnnotations [
27 # CHECK-NEXT: ChangeLineOffset: 1
28 # CHECK-NEXT: ChangeCodeLength: 0x9
29 # CHECK-NEXT: ChangeCodeOffsetAndLineOffset: {CodeOffset: 0x1, LineOffset: 1}
30 # CHECK-NEXT: ChangeCodeOffsetAndLineOffset: {CodeOffset: 0x8, LineOffset: 1}
31 # CHECK-NEXT: ChangeCodeLength: 0x0
36 .def _callit; .scl 2; .type 32; .endef
37 .globl _callit # -- Begin function callit
41 .cv_fpo_proc _callit 0
43 .cv_file 1 "C:\\src\\llvm-project\\build\\t.cpp" "0BC092F354CE14FDC2FA78F8EDE7426E" 1
44 .cv_inline_site_id 1 within 0 inlined_at 1 9 0
45 .cv_loc 1 1 4 0 is_stmt 0 # t.cpp:4:0
50 # %bb.2: # %do_exit.exit
51 .cv_loc 0 1 10 0 # t.cpp:10:0
55 .cv_loc 1 1 5 0 # t.cpp:5:0
59 .cv_loc 1 1 6 0 # t.cpp:6:0
65 .section .debug$S,"dr"
67 .long 4 # Debug section magic
69 .long Ltmp4-Ltmp3 # Subsection size
71 .short Ltmp6-Ltmp5 # Record length
73 .short 4412 # Record kind: S_COMPILE3
74 .long 0 # Flags and language
76 .short 7 # Frontend version
80 .short 7000 # Backend version
84 .asciz "clang version 7.0.0 " # Null-terminated compiler version string
88 .long 246 # Inlinee lines subsection
89 .long Ltmp8-Ltmp7 # Subsection size
91 .long 0 # Inlinee lines signature
93 # Inlined function do_exit starts at t.cpp:3
94 .long 4098 # Type index of inlined function
95 .cv_filechecksumoffset 1 # Offset into filechecksum table
96 .long 3 # Starting line number
100 .long 241 # Symbol subsection for callit
101 .long Ltmp10-Ltmp9 # Subsection size
103 .short Ltmp12-Ltmp11 # Record length
105 .short 4423 # Record kind: S_GPROC32_ID
109 .long Lfunc_end0-_callit # Code size
110 .long 0 # Offset after prologue
111 .long 0 # Offset before epilogue
112 .long 4099 # Function type index
113 .secrel32 _callit # Function section relative address
114 .secidx _callit # Function section index
116 .asciz "callit" # Function name
118 .short Ltmp14-Ltmp13 # Record length
120 .short 4429 # Record kind: S_INLINESITE
123 .long 4098 # Inlinee type index
124 .cv_inline_linetable 1 1 3 Lfunc_begin0 Lfunc_end0
126 .short 2 # Record length
127 .short 4430 # Record kind: S_INLINESITE_END
128 .short 2 # Record length
129 .short 4431 # Record kind: S_PROC_ID_END
132 .cv_linetable 0, _callit, Lfunc_end0
133 .cv_filechecksums # File index to string table offset subsection
134 .cv_stringtable # String table
135 .section .debug$T,"dr"
137 .long 4 # Debug section magic
139 # TypeLeafKind: LF_ARGLIST (0x1201)
144 .byte 0x06, 0x00, 0x01, 0x12
145 .byte 0x00, 0x00, 0x00, 0x00
146 # Procedure (0x1001) {
147 # TypeLeafKind: LF_PROCEDURE (0x1008)
148 # ReturnType: void (0x3)
149 # CallingConvention: NearC (0x0)
150 # FunctionOptions [ (0x0)
153 # ArgListType: () (0x1000)
155 .byte 0x0e, 0x00, 0x08, 0x10
156 .byte 0x03, 0x00, 0x00, 0x00
157 .byte 0x00, 0x00, 0x00, 0x00
158 .byte 0x00, 0x10, 0x00, 0x00
160 # TypeLeafKind: LF_FUNC_ID (0x1601)
162 # FunctionType: void () (0x1001)
165 .byte 0x12, 0x00, 0x01, 0x16
166 .byte 0x00, 0x00, 0x00, 0x00
167 .byte 0x01, 0x10, 0x00, 0x00
168 .byte 0x64, 0x6f, 0x5f, 0x65
169 .byte 0x78, 0x69, 0x74, 0x00
171 # TypeLeafKind: LF_FUNC_ID (0x1601)
173 # FunctionType: void () (0x1001)
176 .byte 0x12, 0x00, 0x01, 0x16
177 .byte 0x00, 0x00, 0x00, 0x00
178 .byte 0x01, 0x10, 0x00, 0x00
179 .byte 0x63, 0x61, 0x6c, 0x6c
180 .byte 0x69, 0x74, 0x00, 0xf1