[flang] Fix length handling in character kind implicit conversion (#74586)
[llvm-project.git] / lldb / test / Shell / SymbolFile / NativePDB / blocks.s
blob7a124702e47571815d1edcb36456f94f83705dd0
1 // clang-format off
2 // REQUIRES: lld, x86
4 // Test block range is set.
5 // RUN: llvm-mc -triple=x86_64-windows-msvc --filetype=obj %s > %t.obj
6 // RUN: lld-link /debug:full /nodefaultlib /entry:main %t.obj /out:%t.exe /base:0x140000000
7 // RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb %t.exe -o "image lookup -a 0x140001014 -v" -o "exit" | FileCheck %s
9 // CHECK: Function: id = {{.*}}, name = "main", range = [0x0000000140001000-0x0000000140001044)
10 // CHECK-NEXT: FuncType: id = {{.*}}, byte-size = 0, compiler_type = "int (void)"
11 // CHECK-NEXT: Blocks: id = {{.*}}, range = [0x140001000-0x140001044)
12 // CHECK-NEXT: id = {{.*}}, range = [0x140001014-0x14000103b)
15 .text
16 .def @feat.00;
17 .scl 3;
18 .type 0;
19 .endef
20 .globl @feat.00
21 .set @feat.00, 0
22 .intel_syntax noprefix
23 .file "blocks.cpp"
24 .def main;
25 .scl 2;
26 .type 32;
27 .endef
28 .globl main # -- Begin function main
29 .p2align 4, 0x90
30 main: # @main
31 .Lfunc_begin0:
32 .cv_func_id 0
33 .cv_file 1 "/tmp/blocks.cpp" "4CC0785E17ACF09C657F740775661395" 1
34 .cv_loc 0 1 1 0 # blocks.cpp:1:0
35 .seh_proc main
36 # %bb.0: # %entry
37 sub rsp, 16
38 .seh_stackalloc 16
39 .seh_endprologue
40 mov dword ptr [rsp + 12], 0
41 .Ltmp0:
42 .cv_loc 0 1 2 0 # blocks.cpp:2:0
43 mov dword ptr [rsp + 8], 0
44 .Ltmp1:
45 .cv_loc 0 1 3 0 # blocks.cpp:3:0
46 mov dword ptr [rsp + 4], 0
47 .LBB0_1: # %for.cond
48 # =>This Inner Loop Header: Depth=1
49 cmp dword ptr [rsp + 4], 3
50 jge .LBB0_4
51 # %bb.2: # %for.body
52 # in Loop: Header=BB0_1 Depth=1
53 .Ltmp2:
54 .cv_loc 0 1 4 0 # blocks.cpp:4:0
55 mov eax, dword ptr [rsp + 8]
56 add eax, 1
57 mov dword ptr [rsp + 8], eax
58 .Ltmp3:
59 # %bb.3: # %for.inc
60 # in Loop: Header=BB0_1 Depth=1
61 .cv_loc 0 1 3 0 # blocks.cpp:3:0
62 mov eax, dword ptr [rsp + 4]
63 add eax, 1
64 mov dword ptr [rsp + 4], eax
65 jmp .LBB0_1
66 .Ltmp4:
67 .LBB0_4: # %for.end
68 .cv_loc 0 1 6 0 # blocks.cpp:6:0
69 mov eax, dword ptr [rsp + 8]
70 add rsp, 16
71 ret
72 .Ltmp5:
73 .Lfunc_end0:
74 .seh_endproc
75 # -- End function
76 .section .drectve,"yn"
77 .ascii " /DEFAULTLIB:libcmt.lib"
78 .ascii " /DEFAULTLIB:oldnames.lib"
79 .section .debug$S,"dr"
80 .p2align 2, 0x0
81 .long 4 # Debug section magic
82 .long 241
83 .long .Ltmp7-.Ltmp6 # Subsection size
84 .Ltmp6:
85 .short .Ltmp9-.Ltmp8 # Record length
86 .Ltmp8:
87 .short 4353 # Record kind: S_OBJNAME
88 .long 0 # Signature
89 .asciz "/tmp/blocks.obj" # Object name
90 .p2align 2, 0x0
91 .Ltmp9:
92 .short .Ltmp11-.Ltmp10 # Record length
93 .Ltmp10:
94 .short 4412 # Record kind: S_COMPILE3
95 .long 1 # Flags and language
96 .short 208 # CPUType
97 .short 16 # Frontend version
98 .short 0
99 .short 0
100 .short 0
101 .short 16000 # Backend version
102 .short 0
103 .short 0
104 .short 0
105 .asciz "clang version 16.0.0" # Null-terminated compiler version string
106 .p2align 2, 0x0
107 .Ltmp11:
108 .Ltmp7:
109 .p2align 2, 0x0
110 .long 241 # Symbol subsection for main
111 .long .Ltmp13-.Ltmp12 # Subsection size
112 .Ltmp12:
113 .short .Ltmp15-.Ltmp14 # Record length
114 .Ltmp14:
115 .short 4423 # Record kind: S_GPROC32_ID
116 .long 0 # PtrParent
117 .long 0 # PtrEnd
118 .long 0 # PtrNext
119 .long .Lfunc_end0-main # Code size
120 .long 0 # Offset after prologue
121 .long 0 # Offset before epilogue
122 .long 4098 # Function type index
123 .secrel32 main # Function section relative address
124 .secidx main # Function section index
125 .byte 0 # Flags
126 .asciz "main" # Function name
127 .p2align 2, 0x0
128 .Ltmp15:
129 .short .Ltmp17-.Ltmp16 # Record length
130 .Ltmp16:
131 .short 4114 # Record kind: S_FRAMEPROC
132 .long 16 # FrameSize
133 .long 0 # Padding
134 .long 0 # Offset of padding
135 .long 0 # Bytes of callee saved registers
136 .long 0 # Exception handler offset
137 .short 0 # Exception handler section
138 .long 81920 # Flags (defines frame register)
139 .p2align 2, 0x0
140 .Ltmp17:
141 .short .Ltmp19-.Ltmp18 # Record length
142 .Ltmp18:
143 .short 4414 # Record kind: S_LOCAL
144 .long 116 # TypeIndex
145 .short 0 # Flags
146 .asciz "count"
147 .p2align 2, 0x0
148 .Ltmp19:
149 .cv_def_range .Ltmp0 .Ltmp5, frame_ptr_rel, 8
150 .short .Ltmp21-.Ltmp20 # Record length
151 .Ltmp20:
152 .short 4355 # Record kind: S_BLOCK32
153 .long 0 # PtrParent
154 .long 0 # PtrEnd
155 .long .Ltmp4-.Ltmp1 # Code size
156 .secrel32 .Ltmp1 # Function section relative address
157 .secidx .Lfunc_begin0 # Function section index
158 .byte 0 # Lexical block name
159 .p2align 2, 0x0
160 .Ltmp21:
161 .short .Ltmp23-.Ltmp22 # Record length
162 .Ltmp22:
163 .short 4414 # Record kind: S_LOCAL
164 .long 116 # TypeIndex
165 .short 0 # Flags
166 .asciz "i"
167 .p2align 2, 0x0
168 .Ltmp23:
169 .cv_def_range .Ltmp1 .Ltmp4, frame_ptr_rel, 4
170 .short 2 # Record length
171 .short 6 # Record kind: S_END
172 .short 2 # Record length
173 .short 4431 # Record kind: S_PROC_ID_END
174 .Ltmp13:
175 .p2align 2, 0x0
176 .cv_linetable 0, main, .Lfunc_end0
177 .cv_filechecksums # File index to string table offset subsection
178 .cv_stringtable # String table
179 .long 241
180 .long .Ltmp25-.Ltmp24 # Subsection size
181 .Ltmp24:
182 .short .Ltmp27-.Ltmp26 # Record length
183 .Ltmp26:
184 .short 4428 # Record kind: S_BUILDINFO
185 .long 4104 # LF_BUILDINFO index
186 .p2align 2, 0x0
187 .Ltmp27:
188 .Ltmp25:
189 .p2align 2, 0x0
190 .section .debug$T,"dr"
191 .p2align 2, 0x0
192 .long 4 # Debug section magic
193 # ArgList (0x1000)
194 .short 0x6 # Record length
195 .short 0x1201 # Record kind: LF_ARGLIST
196 .long 0x0 # NumArgs
197 # Procedure (0x1001)
198 .short 0xe # Record length
199 .short 0x1008 # Record kind: LF_PROCEDURE
200 .long 0x74 # ReturnType: int
201 .byte 0x0 # CallingConvention: NearC
202 .byte 0x0 # FunctionOptions
203 .short 0x0 # NumParameters
204 .long 0x1000 # ArgListType: ()
205 # FuncId (0x1002)
206 .short 0x12 # Record length
207 .short 0x1601 # Record kind: LF_FUNC_ID
208 .long 0x0 # ParentScope
209 .long 0x1001 # FunctionType: int ()
210 .asciz "main" # Name
211 .byte 243
212 .byte 242
213 .byte 241