1 # RUN: llvm-mc < %s -triple=i686-pc-win32 -filetype=obj | llvm-readobj - -codeview | FileCheck %s
3 # Based on the other cv-loc-unreachable-2.s, but with other code in the same
4 # section afterwards. We had negative label difference assertions when .cv_loc
5 # bound tightly to the next instruction.
7 # CHECK-LABEL: InlineeSourceLine {
8 # CHECK: Inlinee: do_exit (0x1002)
9 # CHECK: FileID: C:\src\llvm-project\build\t.cpp (0x0)
10 # CHECK: SourceLineNum: 3
13 # CHECK-LABEL: InlineSiteSym {
14 # CHECK: Kind: S_INLINESITE (0x114D)
15 # CHECK: Inlinee: do_exit (0x1002)
16 # CHECK: BinaryAnnotations [
17 # CHECK-NEXT: ChangeLineOffset: 1
18 # CHECK-NEXT: ChangeCodeLength: 0x9
19 # CHECK-NEXT: ChangeCodeOffsetAndLineOffset: {CodeOffset: 0x1, LineOffset: 1}
20 # CHECK-NEXT: ChangeCodeOffsetAndLineOffset: {CodeOffset: 0x8, LineOffset: 1}
21 # CHECK-NEXT: ChangeCodeLength: 0x0
26 .def _callit; .scl 2; .type 32; .endef
27 .globl _callit # -- Begin function callit
31 .cv_fpo_proc _callit 0
33 .cv_file 1 "C:\\src\\llvm-project\\build\\t.cpp" "0BC092F354CE14FDC2FA78F8EDE7426E" 1
34 .cv_inline_site_id 1 within 0 inlined_at 1 9 0
35 .cv_loc 1 1 4 0 is_stmt 0 # t.cpp:4:0
40 # %bb.2: # %do_exit.exit
41 .cv_loc 0 1 10 0 # t.cpp:10:0
45 .cv_loc 1 1 5 0 # t.cpp:5:0
49 .cv_loc 1 1 6 0 # t.cpp:6:0
59 .section .debug$S,"dr"
61 .long 4 # Debug section magic
63 .long Ltmp4-Ltmp3 # Subsection size
65 .short Ltmp6-Ltmp5 # Record length
67 .short 4412 # Record kind: S_COMPILE3
68 .long 0 # Flags and language
70 .short 7 # Frontend version
74 .short 7000 # Backend version
78 .asciz "clang version 7.0.0 " # Null-terminated compiler version string
82 .long 246 # Inlinee lines subsection
83 .long Ltmp8-Ltmp7 # Subsection size
85 .long 0 # Inlinee lines signature
87 # Inlined function do_exit starts at t.cpp:3
88 .long 4098 # Type index of inlined function
89 .cv_filechecksumoffset 1 # Offset into filechecksum table
90 .long 3 # Starting line number
94 .long 241 # Symbol subsection for callit
95 .long Ltmp10-Ltmp9 # Subsection size
97 .short Ltmp12-Ltmp11 # Record length
99 .short 4423 # Record kind: S_GPROC32_ID
103 .long Lfunc_end0-_callit # Code size
104 .long 0 # Offset after prologue
105 .long 0 # Offset before epilogue
106 .long 4099 # Function type index
107 .secrel32 _callit # Function section relative address
108 .secidx _callit # Function section index
110 .asciz "callit" # Function name
112 .short Ltmp14-Ltmp13 # Record length
114 .short 4429 # Record kind: S_INLINESITE
117 .long 4098 # Inlinee type index
118 .cv_inline_linetable 1 1 3 Lfunc_begin0 Lfunc_end0
120 .short 2 # Record length
121 .short 4430 # Record kind: S_INLINESITE_END
122 .short 2 # Record length
123 .short 4431 # Record kind: S_PROC_ID_END
126 .cv_linetable 0, _callit, Lfunc_end0
127 .cv_filechecksums # File index to string table offset subsection
128 .cv_stringtable # String table
129 .section .debug$T,"dr"
131 .long 4 # Debug section magic
133 # TypeLeafKind: LF_ARGLIST (0x1201)
138 .byte 0x06, 0x00, 0x01, 0x12
139 .byte 0x00, 0x00, 0x00, 0x00
140 # Procedure (0x1001) {
141 # TypeLeafKind: LF_PROCEDURE (0x1008)
142 # ReturnType: void (0x3)
143 # CallingConvention: NearC (0x0)
144 # FunctionOptions [ (0x0)
147 # ArgListType: () (0x1000)
149 .byte 0x0e, 0x00, 0x08, 0x10
150 .byte 0x03, 0x00, 0x00, 0x00
151 .byte 0x00, 0x00, 0x00, 0x00
152 .byte 0x00, 0x10, 0x00, 0x00
154 # TypeLeafKind: LF_FUNC_ID (0x1601)
156 # FunctionType: void () (0x1001)
159 .byte 0x12, 0x00, 0x01, 0x16
160 .byte 0x00, 0x00, 0x00, 0x00
161 .byte 0x01, 0x10, 0x00, 0x00
162 .byte 0x64, 0x6f, 0x5f, 0x65
163 .byte 0x78, 0x69, 0x74, 0x00
165 # TypeLeafKind: LF_FUNC_ID (0x1601)
167 # FunctionType: void () (0x1001)
170 .byte 0x12, 0x00, 0x01, 0x16
171 .byte 0x00, 0x00, 0x00, 0x00
172 .byte 0x01, 0x10, 0x00, 0x00
173 .byte 0x63, 0x61, 0x6c, 0x6c
174 .byte 0x69, 0x74, 0x00, 0xf1