1 ; RUN: llc -mcpu=core2 -mtriple=i686-pc-win32 -O0 < %s | FileCheck --check-prefix=X86 %s
2 ; RUN: llc -mcpu=core2 -mtriple=i686-pc-win32-itanium -O0 < %s | FileCheck --check-prefix=X86 %s
3 ; RUN: llc -mcpu=core2 -mtriple=i686-pc-win32-gnu -O0 < %s | FileCheck --check-prefix=X86 %s
4 ; RUN: llc -mcpu=core2 -mtriple=i686-pc-win32 -o - -O0 < %s | llvm-mc -triple=i686-pc-win32 -filetype=obj | llvm-readobj -S --sr --codeview --section-symbols - | FileCheck --check-prefix=OBJ32 %s
5 ; RUN: llc -mcpu=core2 -mtriple=i686-pc-win32-itanium -o - -O0 < %s | llvm-mc -triple=i686-pc-win32 -filetype=obj | llvm-readobj -S --sr --codeview --section-symbols - | FileCheck --check-prefix=OBJ32 %s
6 ; RUN: llc -mcpu=core2 -mtriple=i686-pc-win32-gnu -o - -O0 < %s | llvm-mc -triple=i686-pc-win32 -filetype=obj | llvm-readobj -S --sr --codeview --section-symbols - | FileCheck --check-prefix=OBJ32 %s
7 ; RUN: llc -mcpu=core2 -mtriple=x86_64-pc-win32 -O0 < %s | FileCheck --check-prefix=X64 %s
8 ; RUN: llc -mcpu=core2 -mtriple=x86_64-pc-win32-itanium -O0 < %s | FileCheck --check-prefix=X64 %s
9 ; RUN: llc -mcpu=core2 -mtriple=x86_64-pc-win32-gnu -O0 < %s | FileCheck --check-prefix=X64 %s
10 ; RUN: llc -mcpu=core2 -mtriple=x86_64-pc-win32 -o - -O0 < %s | llvm-mc -triple=x86_64-pc-win32 -filetype=obj | llvm-readobj -S --sr --codeview --section-symbols - | FileCheck --check-prefix=OBJ64 %s
11 ; RUN: llc -mcpu=core2 -mtriple=x86_64-pc-win32-itanium -o - -O0 < %s | llvm-mc -triple=x86_64-pc-win32 -filetype=obj | llvm-readobj -S --sr --codeview --section-symbols - | FileCheck --check-prefix=OBJ64 %s
12 ; RUN: llc -mcpu=core2 -mtriple=x86_64-pc-win32-gnu -o - -O0 < %s | llvm-mc -triple=x86_64-pc-win32 -filetype=obj | llvm-readobj -S --sr --codeview --section-symbols - | FileCheck --check-prefix=OBJ64 %s
14 ; This LL file was generated by running clang on the following code:
24 ; X86: .cv_file 1 "D:\\test.c" "F310AB26998CA831CBDF169E4EECACFA" 1
25 ; X86: .cv_loc 0 1 4 2 # test.c:4:2
27 ; X86: .cv_loc 0 1 5 0 # test.c:5:0
29 ; X86: [[END_OF_F:Lfunc_end.*]]:
31 ; X86-LABEL: .section .debug$S,"dr"
32 ; X86-NEXT: .p2align 2
36 ; X86-NEXT: .long [[COMPILE_END:.*]]-[[COMPILE_START:.*]] #
37 ; Compiler information record
38 ; X86-NEXT: [[COMPILE_START]]:
39 ; X86-NEXT: .short [[OBJNAME_END:.*]]-[[OBJNAME_START:.*]] #
40 ; X86: [[OBJNAME_END]]:
41 ; X86-NEXT: .short [[COMPILE3_END:.*]]-[[COMPILE3_START:.*]] #
42 ; X86: [[COMPILE3_END]]:
43 ; X86-NEXT: [[COMPILE_END]]:
44 ; X86-NEXT: .p2align 2
45 ; X86-NEXT: .cv_fpo_data _f
46 ; X86-NEXT: .long 241 # Symbol subsection for f
47 ; X86-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]] # Subsection size
48 ; X86-NEXT: [[F1_START]]:
49 ; X86-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] #
50 ; X86-NEXT: [[PROC_SEGMENT_START]]:
51 ; X86-NEXT: .short 4423
55 ; X86-NEXT: .long [[END_OF_F]]-_f
58 ; X86-NEXT: .long 4098
59 ; X86-NEXT: .secrel32 _f
60 ; X86-NEXT: .secidx _f
62 ; X86-NEXT: .asciz "f"
63 ; X86-NEXT: .p2align 2
64 ; X86-NEXT: [[PROC_SEGMENT_END]]:
65 ; X86-NEXT: .short [[FPROC_END:[^ ]*]]-[[FPROC_BEG:[^ ]*]] # Record length
66 ; X86-NEXT: [[FPROC_BEG]]:
67 ; X86-NEXT: .short 4114 # Record kind: S_FRAMEPROC
68 ; X86-NEXT: .long 0 # FrameSize
69 ; X86-NEXT: .long 0 # Padding
70 ; X86-NEXT: .long 0 # Offset of padding
71 ; X86-NEXT: .long 0 # Bytes of callee saved registers
72 ; X86-NEXT: .long 0 # Exception handler offset
73 ; X86-NEXT: .short 0 # Exception handler section
74 ; X86-NEXT: .long 8192 # Flags (defines frame register)
75 ; X86-NEXT: .p2align 2
76 ; X86-NEXT: [[FPROC_END]]:
78 ; X86-NEXT: .short 4431
79 ; X86-NEXT: [[F1_END]]:
80 ; X86-NEXT: .p2align 2
82 ; X86-NEXT: .cv_linetable 0, _f, [[END_OF_F]]
83 ; File index to string table offset subsection
84 ; X86-NEXT: .cv_filechecksums
86 ; X86-NEXT: .cv_stringtable
89 ; OBJ32: Name: .debug$S (2E 64 65 62 75 67 24 53)
90 ; OBJ32: Characteristics [ (0x42300040)
92 ; OBJ32: Relocations [
93 ; OBJ32-NEXT: 0x50 IMAGE_REL_I386_DIR32NB _f
94 ; OBJ32-NEXT: 0x9C IMAGE_REL_I386_SECREL _f
95 ; OBJ32-NEXT: 0xA0 IMAGE_REL_I386_SECTION _f
96 ; OBJ32-NEXT: 0xD4 IMAGE_REL_I386_SECREL _f
97 ; OBJ32-NEXT: 0xD8 IMAGE_REL_I386_SECTION _f
100 ; OBJ32-NEXT: SubSectionType: Symbols (0xF1)
103 ; OBJ32: Subsection [
104 ; OBJ32-NEXT: SubSectionType: FrameData (0xF5)
106 ; OBJ32: Subsection [
107 ; OBJ32-NEXT: SubSectionType: Symbols (0xF1)
108 ; OBJ32: {{.*}}Proc{{.*}}Sym {
109 ; OBJ32: CodeSize: 0x6
110 ; OBJ32: DisplayName: f
111 ; OBJ32: LinkageName: _f
116 ; OBJ32: Subsection [
117 ; OBJ32: SubSectionType: FileChecksums (0xF4)
118 ; OBJ32-NEXT: SubSectionSize: 0x18
119 ; OBJ32-NEXT: FileChecksum {
120 ; OBJ32-NEXT: Filename: D:\test.c (0x1)
121 ; OBJ32-NEXT: ChecksumSize: 0x10
122 ; OBJ32-NEXT: ChecksumKind: MD5 (0x1)
123 ; OBJ32-NEXT: ChecksumBytes: (F3 10 AB 26 99 8C A8 31 CB DF 16 9E 4E EC AC FA)
126 ; OBJ32: FunctionLineTable [
127 ; OBJ32-NEXT: Name: _f
128 ; OBJ32-NEXT: Flags: 0x1
129 ; OBJ32-NEXT: CodeSize: 0x6
130 ; OBJ32-NEXT: FilenameSegment [
131 ; OBJ32-NEXT: Filename: D:\test.c
133 ; OBJ32-NEXT: LineNumberStart: 4
134 ; OBJ32-NEXT: LineNumberEndDelta: 0
135 ; OBJ32-NEXT: IsStatement: No
136 ; OBJ32-NEXT: ColStart: 2
137 ; OBJ32-NEXT: ColEnd: 0
140 ; OBJ32-NEXT: LineNumberStart: 5
141 ; OBJ32-NEXT: LineNumberEndDelta: 0
142 ; OBJ32-NEXT: IsStatement: No
143 ; OBJ32-NEXT: ColStart: 0
144 ; OBJ32-NEXT: ColEnd: 0
150 ; X64-NEXT: .L{{.*}}:{{$}}
151 ; X64: .cv_file 1 "D:\\test.c" "F310AB26998CA831CBDF169E4EECACFA" 1
152 ; X64: .cv_loc 0 1 3 0 # test.c:3:0
154 ; X64: subq $40, %rsp
155 ; X64: .cv_loc 0 1 4 2 # test.c:4:2
157 ; X64: .cv_loc 0 1 5 0 # test.c:5:0
158 ; X64: addq $40, %rsp
160 ; X64: [[END_OF_F:.?Lfunc_end.*]]:
162 ; X64-LABEL: .section .debug$S,"dr"
163 ; X64-NEXT: .p2align 2
166 ; X64-NEXT: .long 241
167 ; X64-NEXT: .long [[COMPILE_END:.*]]-[[COMPILE_START:.*]] #
168 ; Compiler information record
169 ; X64-NEXT: [[COMPILE_START]]:
170 ; X64-NEXT: .short [[OBJNAME_END:.*]]-[[OBJNAME_START:.*]] #
171 ; X64: [[OBJNAME_END]]:
172 ; X64-NEXT: .short [[COMPILE3_END:.*]]-[[COMPILE3_START:.*]] #
173 ; X64: [[COMPILE3_END]]:
174 ; X64-NEXT: [[COMPILE_END]]:
175 ; X64-NEXT: .p2align 2
176 ; X64-NEXT: .long 241 # Symbol subsection for f
177 ; X64-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]] # Subsection size
178 ; X64-NEXT: [[F1_START]]:
179 ; X64-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] #
180 ; X64-NEXT: [[PROC_SEGMENT_START]]:
181 ; X64-NEXT: .short 4423
185 ; X64-NEXT: .long [[END_OF_F]]-f
188 ; X64-NEXT: .long 4098
189 ; X64-NEXT: .secrel32 f
190 ; X64-NEXT: .secidx f
191 ; X64-NEXT: .byte 128
192 ; X64-NEXT: .asciz "f"
193 ; X64-NEXT: .p2align 2
194 ; X64-NEXT: [[PROC_SEGMENT_END]]:
195 ; X64-NEXT: .short [[FPROC_END:[^ ]*]]-[[FPROC_BEG:[^ ]*]] # Record length
196 ; X64-NEXT: [[FPROC_BEG]]:
197 ; X64-NEXT: .short 4114 # Record kind: S_FRAMEPROC
198 ; X64-NEXT: .long 40 # FrameSize
199 ; X64-NEXT: .long 0 # Padding
200 ; X64-NEXT: .long 0 # Offset of padding
201 ; X64-NEXT: .long 0 # Bytes of callee saved registers
202 ; X64-NEXT: .long 0 # Exception handler offset
203 ; X64-NEXT: .short 0 # Exception handler section
204 ; X64-NEXT: .long 90112 # Flags (defines frame register)
205 ; X64-NEXT: .p2align 2
206 ; X64-NEXT: [[FPROC_END]]:
208 ; X64-NEXT: .short 4431
209 ; X64-NEXT: [[F1_END]]:
210 ; X64-NEXT: .p2align 2
212 ; X64-NEXT: .cv_linetable 0, f, [[END_OF_F]]
213 ; File index to string table offset subsection
214 ; X64-NEXT: .cv_filechecksums
216 ; X64-NEXT: .cv_stringtable
219 ; OBJ64: Name: .debug$S (2E 64 65 62 75 67 24 53)
220 ; OBJ64: Characteristics [ (0x42300040)
222 ; OBJ64: Relocations [
223 ; OBJ64-NEXT: 0x70 IMAGE_REL_AMD64_SECREL f
224 ; OBJ64-NEXT: 0x74 IMAGE_REL_AMD64_SECTION f
225 ; OBJ64-NEXT: 0xA8 IMAGE_REL_AMD64_SECREL f
226 ; OBJ64-NEXT: 0xAC IMAGE_REL_AMD64_SECTION f
228 ; OBJ64: Subsection [
229 ; OBJ64-NEXT: SubSectionType: Symbols (0xF1)
230 ; OBJ64: {{.*}}Proc{{.*}}Sym {
231 ; OBJ64: CodeSize: 0xE
232 ; OBJ64: DisplayName: f
233 ; OBJ64: LinkageName: f
238 ; OBJ64: Subsection [
239 ; OBJ64: SubSectionType: FileChecksums (0xF4)
240 ; OBJ64-NEXT: SubSectionSize: 0x18
241 ; OBJ64-NEXT: FileChecksum {
242 ; OBJ64-NEXT: Filename: D:\test.c (0x1)
243 ; OBJ64-NEXT: ChecksumSize: 0x10
244 ; OBJ64-NEXT: ChecksumKind: MD5 (0x1)
245 ; OBJ64-NEXT: ChecksumBytes: (F3 10 AB 26 99 8C A8 31 CB DF 16 9E 4E EC AC FA)
248 ; OBJ64: FunctionLineTable [
249 ; OBJ64-NEXT: Name: f
250 ; OBJ64-NEXT: Flags: 0x1
251 ; OBJ64-NEXT: CodeSize: 0xE
252 ; OBJ64-NEXT: FilenameSegment [
253 ; OBJ64-NEXT: Filename: D:\test.c
255 ; OBJ64-NEXT: LineNumberStart: 3
256 ; OBJ64-NEXT: LineNumberEndDelta: 0
257 ; OBJ64-NEXT: IsStatement: No
258 ; OBJ64-NEXT: ColStart: 0
259 ; OBJ64-NEXT: ColEnd: 0
262 ; OBJ64-NEXT: LineNumberStart: 4
263 ; OBJ64-NEXT: LineNumberEndDelta: 0
264 ; OBJ64-NEXT: IsStatement: No
265 ; OBJ64-NEXT: ColStart: 2
266 ; OBJ64-NEXT: ColEnd: 0
269 ; OBJ64-NEXT: LineNumberStart: 5
270 ; OBJ64-NEXT: LineNumberEndDelta: 0
271 ; OBJ64-NEXT: IsStatement: No
272 ; OBJ64-NEXT: ColStart: 0
273 ; OBJ64-NEXT: ColEnd: 0
278 ; Function Attrs: nounwind
279 define void @f() #0 !dbg !4 {
281 call void @g(), !dbg !12
287 attributes #0 = { nounwind "less-precise-fpmad"="false" "frame-pointer"="none" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-realign-stack" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
288 attributes #1 = { "less-precise-fpmad"="false" "frame-pointer"="none" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-realign-stack" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
291 !llvm.module.flags = !{!9, !10}
294 !0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2)
295 !1 = !DIFile(filename: "<unknown>", directory: "D:\5C")
297 !4 = distinct !DISubprogram(name: "f", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !5, scope: !6, type: !7, retainedNodes: !2)
298 !5 = !DIFile(filename: "test.c", directory: "D:\5C", checksumkind: CSK_MD5, checksum: "f310ab26998ca831cbdf169e4eecacfa")
299 !6 = !DIFile(filename: "test.c", directory: "D:C", checksumkind: CSK_MD5, checksum: "f310ab26998ca831cbdf169e4eecacfa")
300 !7 = !DISubroutineType(types: !8)
302 !9 = !{i32 2, !"CodeView", i32 1}
303 !10 = !{i32 1, !"Debug Info Version", i32 3}
304 !11 = !{!"clang version 3.5 "}
305 !12 = !DILocation(line: 4, column: 2, scope: !4)
306 !13 = !DILocation(line: 5, scope: !4)