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 [[C1_END:.*]]-[[C1_START:.*]] #
41 ; X86-NEXT: [[COMPILE_END]]:
42 ; X86-NEXT: .p2align 2
43 ; X86-NEXT: .cv_fpo_data _f
44 ; X86-NEXT: .long 241 # Symbol subsection for f
45 ; X86-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]] # Subsection size
46 ; X86-NEXT: [[F1_START]]:
47 ; X86-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] #
48 ; X86-NEXT: [[PROC_SEGMENT_START]]:
49 ; X86-NEXT: .short 4423
53 ; X86-NEXT: .long [[END_OF_F]]-_f
56 ; X86-NEXT: .long 4098
57 ; X86-NEXT: .secrel32 _f
58 ; X86-NEXT: .secidx _f
60 ; X86-NEXT: .asciz "f"
61 ; X86-NEXT: .p2align 2
62 ; X86-NEXT: [[PROC_SEGMENT_END]]:
63 ; X86-NEXT: .short [[FPROC_END:[^ ]*]]-[[FPROC_BEG:[^ ]*]] # Record length
64 ; X86-NEXT: [[FPROC_BEG]]:
65 ; X86-NEXT: .short 4114 # Record kind: S_FRAMEPROC
66 ; X86-NEXT: .long 0 # FrameSize
67 ; X86-NEXT: .long 0 # Padding
68 ; X86-NEXT: .long 0 # Offset of padding
69 ; X86-NEXT: .long 0 # Bytes of callee saved registers
70 ; X86-NEXT: .long 0 # Exception handler offset
71 ; X86-NEXT: .short 0 # Exception handler section
72 ; X86-NEXT: .long 0 # Flags (defines frame register)
73 ; X86-NEXT: .p2align 2
74 ; X86-NEXT: [[FPROC_END]]:
76 ; X86-NEXT: .short 4431
77 ; X86-NEXT: [[F1_END]]:
78 ; X86-NEXT: .p2align 2
80 ; X86-NEXT: .cv_linetable 0, _f, [[END_OF_F]]
81 ; File index to string table offset subsection
82 ; X86-NEXT: .cv_filechecksums
84 ; X86-NEXT: .cv_stringtable
87 ; OBJ32: Name: .debug$S (2E 64 65 62 75 67 24 53)
88 ; OBJ32: Characteristics [ (0x42300040)
90 ; OBJ32: Relocations [
91 ; OBJ32-NEXT: 0x44 IMAGE_REL_I386_DIR32NB _f
92 ; OBJ32-NEXT: 0x90 IMAGE_REL_I386_SECREL _f
93 ; OBJ32-NEXT: 0x94 IMAGE_REL_I386_SECTION _f
94 ; OBJ32-NEXT: 0xC8 IMAGE_REL_I386_SECREL _f
95 ; OBJ32-NEXT: 0xCC IMAGE_REL_I386_SECTION _f
98 ; OBJ32-NEXT: SubSectionType: Symbols (0xF1)
101 ; OBJ32: Subsection [
102 ; OBJ32-NEXT: SubSectionType: FrameData (0xF5)
104 ; OBJ32: Subsection [
105 ; OBJ32-NEXT: SubSectionType: Symbols (0xF1)
106 ; OBJ32: {{.*}}Proc{{.*}}Sym {
107 ; OBJ32: CodeSize: 0x6
108 ; OBJ32: DisplayName: f
109 ; OBJ32: LinkageName: _f
114 ; OBJ32: Subsection [
115 ; OBJ32: SubSectionType: FileChecksums (0xF4)
116 ; OBJ32-NEXT: SubSectionSize: 0x18
117 ; OBJ32-NEXT: FileChecksum {
118 ; OBJ32-NEXT: Filename: D:\test.c (0x1)
119 ; OBJ32-NEXT: ChecksumSize: 0x10
120 ; OBJ32-NEXT: ChecksumKind: MD5 (0x1)
121 ; OBJ32-NEXT: ChecksumBytes: (F3 10 AB 26 99 8C A8 31 CB DF 16 9E 4E EC AC FA)
124 ; OBJ32: FunctionLineTable [
125 ; OBJ32-NEXT: Name: _f
126 ; OBJ32-NEXT: Flags: 0x1
127 ; OBJ32-NEXT: CodeSize: 0x6
128 ; OBJ32-NEXT: FilenameSegment [
129 ; OBJ32-NEXT: Filename: D:\test.c
131 ; OBJ32-NEXT: LineNumberStart: 4
132 ; OBJ32-NEXT: LineNumberEndDelta: 0
133 ; OBJ32-NEXT: IsStatement: No
134 ; OBJ32-NEXT: ColStart: 2
135 ; OBJ32-NEXT: ColEnd: 0
138 ; OBJ32-NEXT: LineNumberStart: 5
139 ; OBJ32-NEXT: LineNumberEndDelta: 0
140 ; OBJ32-NEXT: IsStatement: No
141 ; OBJ32-NEXT: ColStart: 0
142 ; OBJ32-NEXT: ColEnd: 0
148 ; X64-NEXT: .L{{.*}}:{{$}}
149 ; X64: .cv_file 1 "D:\\test.c" "F310AB26998CA831CBDF169E4EECACFA" 1
150 ; X64: .cv_loc 0 1 3 0 # test.c:3:0
152 ; X64: subq $40, %rsp
153 ; X64: .cv_loc 0 1 4 2 # test.c:4:2
155 ; X64: .cv_loc 0 1 5 0 # test.c:5:0
156 ; X64: addq $40, %rsp
158 ; X64: [[END_OF_F:.?Lfunc_end.*]]:
160 ; X64-LABEL: .section .debug$S,"dr"
161 ; X64-NEXT: .p2align 2
164 ; X64-NEXT: .long 241
165 ; X64-NEXT: .long [[COMPILE_END:.*]]-[[COMPILE_START:.*]] #
166 ; Compiler information record
167 ; X64-NEXT: [[COMPILE_START]]:
168 ; X64-NEXT: .short [[C1_END:.*]]-[[C1_START:.*]] #
170 ; X64-NEXT: [[COMPILE_END]]:
171 ; X64-NEXT: .p2align 2
172 ; X64-NEXT: .long 241 # Symbol subsection for f
173 ; X64-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]] # Subsection size
174 ; X64-NEXT: [[F1_START]]:
175 ; X64-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] #
176 ; X64-NEXT: [[PROC_SEGMENT_START]]:
177 ; X64-NEXT: .short 4423
181 ; X64-NEXT: .long [[END_OF_F]]-f
184 ; X64-NEXT: .long 4098
185 ; X64-NEXT: .secrel32 f
186 ; X64-NEXT: .secidx f
188 ; X64-NEXT: .asciz "f"
189 ; X64-NEXT: .p2align 2
190 ; X64-NEXT: [[PROC_SEGMENT_END]]:
191 ; X64-NEXT: .short [[FPROC_END:[^ ]*]]-[[FPROC_BEG:[^ ]*]] # Record length
192 ; X64-NEXT: [[FPROC_BEG]]:
193 ; X64-NEXT: .short 4114 # Record kind: S_FRAMEPROC
194 ; X64-NEXT: .long 40 # FrameSize
195 ; X64-NEXT: .long 0 # Padding
196 ; X64-NEXT: .long 0 # Offset of padding
197 ; X64-NEXT: .long 0 # Bytes of callee saved registers
198 ; X64-NEXT: .long 0 # Exception handler offset
199 ; X64-NEXT: .short 0 # Exception handler section
200 ; X64-NEXT: .long 81920 # Flags (defines frame register)
201 ; X64-NEXT: .p2align 2
202 ; X64-NEXT: [[FPROC_END]]:
204 ; X64-NEXT: .short 4431
205 ; X64-NEXT: [[F1_END]]:
206 ; X64-NEXT: .p2align 2
208 ; X64-NEXT: .cv_linetable 0, f, [[END_OF_F]]
209 ; File index to string table offset subsection
210 ; X64-NEXT: .cv_filechecksums
212 ; X64-NEXT: .cv_stringtable
215 ; OBJ64: Name: .debug$S (2E 64 65 62 75 67 24 53)
216 ; OBJ64: Characteristics [ (0x42300040)
218 ; OBJ64: Relocations [
219 ; OBJ64-NEXT: 0x64 IMAGE_REL_AMD64_SECREL f
220 ; OBJ64-NEXT: 0x68 IMAGE_REL_AMD64_SECTION f
221 ; OBJ64-NEXT: 0x9C IMAGE_REL_AMD64_SECREL f
222 ; OBJ64-NEXT: 0xA0 IMAGE_REL_AMD64_SECTION f
224 ; OBJ64: Subsection [
225 ; OBJ64-NEXT: SubSectionType: Symbols (0xF1)
226 ; OBJ64: {{.*}}Proc{{.*}}Sym {
227 ; OBJ64: CodeSize: 0xE
228 ; OBJ64: DisplayName: f
229 ; OBJ64: LinkageName: f
234 ; OBJ64: Subsection [
235 ; OBJ64: SubSectionType: FileChecksums (0xF4)
236 ; OBJ64-NEXT: SubSectionSize: 0x18
237 ; OBJ64-NEXT: FileChecksum {
238 ; OBJ64-NEXT: Filename: D:\test.c (0x1)
239 ; OBJ64-NEXT: ChecksumSize: 0x10
240 ; OBJ64-NEXT: ChecksumKind: MD5 (0x1)
241 ; OBJ64-NEXT: ChecksumBytes: (F3 10 AB 26 99 8C A8 31 CB DF 16 9E 4E EC AC FA)
244 ; OBJ64: FunctionLineTable [
245 ; OBJ64-NEXT: Name: f
246 ; OBJ64-NEXT: Flags: 0x1
247 ; OBJ64-NEXT: CodeSize: 0xE
248 ; OBJ64-NEXT: FilenameSegment [
249 ; OBJ64-NEXT: Filename: D:\test.c
251 ; OBJ64-NEXT: LineNumberStart: 3
252 ; OBJ64-NEXT: LineNumberEndDelta: 0
253 ; OBJ64-NEXT: IsStatement: No
254 ; OBJ64-NEXT: ColStart: 0
255 ; OBJ64-NEXT: ColEnd: 0
258 ; OBJ64-NEXT: LineNumberStart: 4
259 ; OBJ64-NEXT: LineNumberEndDelta: 0
260 ; OBJ64-NEXT: IsStatement: No
261 ; OBJ64-NEXT: ColStart: 2
262 ; OBJ64-NEXT: ColEnd: 0
265 ; OBJ64-NEXT: LineNumberStart: 5
266 ; OBJ64-NEXT: LineNumberEndDelta: 0
267 ; OBJ64-NEXT: IsStatement: No
268 ; OBJ64-NEXT: ColStart: 0
269 ; OBJ64-NEXT: ColEnd: 0
274 ; Function Attrs: nounwind
275 define void @f() #0 !dbg !4 {
277 call void @g(), !dbg !12
283 attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "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" }
284 attributes #1 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "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" }
287 !llvm.module.flags = !{!9, !10}
290 !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)
291 !1 = !DIFile(filename: "<unknown>", directory: "D:\5C")
293 !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)
294 !5 = !DIFile(filename: "test.c", directory: "D:\5C", checksumkind: CSK_MD5, checksum: "f310ab26998ca831cbdf169e4eecacfa")
295 !6 = !DIFile(filename: "test.c", directory: "D:C", checksumkind: CSK_MD5, checksum: "f310ab26998ca831cbdf169e4eecacfa")
296 !7 = !DISubroutineType(types: !8)
298 !9 = !{i32 2, !"CodeView", i32 1}
299 !10 = !{i32 1, !"Debug Info Version", i32 3}
300 !11 = !{!"clang version 3.5 "}
301 !12 = !DILocation(line: 4, column: 2, scope: !4)
302 !13 = !DILocation(line: 5, scope: !4)