• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 -o - -O0 < %s | llvm-mc -triple=i686-pc-win32 -filetype=obj | llvm-readobj -s -sr -codeview -section-symbols | FileCheck --check-prefix=OBJ32 %s
3; RUN: llc -mcpu=core2 -mtriple=x86_64-pc-win32 -O0 < %s | FileCheck --check-prefix=X64 %s
4; 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
5
6; This LL file was generated by running clang on the following code:
7; D:\input.c:
8;  1 void g(void);
9;  2
10;  3 void f(void) {
11;  4 #line 1 "one.c"
12;  5   g();
13;  6 #line 2 "two.c"
14;  7   g();
15;  8 #line 7 "one.c"
16;  9   g();
17; 10 }
18
19; X86-LABEL: _f:
20; X86:      # %bb.
21; X86:      .cv_file 1 "D:\\one.c" "70B51F534D80639D033AE92C6A856AF6" 1
22; X86:      .cv_loc 0 1 1 0 is_stmt 0 # one.c:1:0
23; X86:      calll   _g
24; X86:      .cv_file 2 "D:\\two.c" "70B51F534D80639D033AE92C6A856AF6" 1
25; X86:      .cv_loc 0 2 2 0 # two.c:2:0
26; X86:      calll   _g
27; X86:      .cv_loc 0 1 7 0 # one.c:7:0
28; X86:      calll   _g
29; X86:      .cv_loc 0 1 8 0 # one.c:8:0
30; X86:      ret
31; X86:      [[END_OF_F:.?Lfunc_end.*]]:
32
33; Line table
34; X86:      .cv_linetable 0, _f, [[END_OF_F]]
35; File index to string table offset subsection
36; X86-NEXT: .cv_filechecksums
37; String table
38; X86-NEXT: .cv_stringtable
39
40; OBJ32:    Section {
41; OBJ32:      Name: .debug$S (2E 64 65 62 75 67 24 53)
42; OBJ32:      Characteristics [ (0x42300040)
43; OBJ32:      ]
44; OBJ32:      Subsection [
45; OBJ32-NEXT:   SubSectionType: Symbols (0xF1)
46; OBJ32:        {{.*}}Proc{{.*}}Sym {
47; OBJ32:          CodeSize: 0x10
48; OBJ32:          DisplayName: f
49; OBJ32:          LinkageName: _f
50; OBJ32:        }
51; OBJ32-NEXT:   ProcEnd {
52; OBJ32:        }
53; OBJ32-NEXT: ]
54; OBJ32:	  Subsection [
55; OBJ32:        SubSectionType: FileChecksums (0xF4)
56; OBJ32-NEXT:   SubSectionSize: 0x30
57; OBJ32-NEXT:   FileChecksum {
58; OBJ32-NEXT:     Filename: D:\one.c (0x1)
59; OBJ32-NEXT:     ChecksumSize: 0x10
60; OBJ32-NEXT:     ChecksumKind: MD5 (0x1)
61; OBJ32-NEXT:     ChecksumBytes: (70 B5 1F 53 4D 80 63 9D 03 3A E9 2C 6A 85 6A F6)
62; OBJ32-NEXT:   }
63; OBJ32-NEXT:   FileChecksum {
64; OBJ32-NEXT:     Filename: D:\two.c (0xA)
65; OBJ32-NEXT:     ChecksumSize: 0x10
66; OBJ32-NEXT:     ChecksumKind: MD5 (0x1)
67; OBJ32-NEXT:     ChecksumBytes: (70 B5 1F 53 4D 80 63 9D 03 3A E9 2C 6A 85 6A F6)
68; OBJ32-NEXT:   }
69; OBJ32-NEXT:  ]
70; OBJ32:      FunctionLineTable [
71; OBJ32-NEXT:   Name: _f
72; OBJ32-NEXT:   Flags: 0x0
73; OBJ32-NEXT:   CodeSize: 0x10
74; OBJ32-NEXT:   FilenameSegment [
75; OBJ32-NEXT:     Filename: D:\one.c
76; OBJ32-NEXT:     +0x0 [
77; OBJ32-NEXT:       LineNumberStart: 1
78; OBJ32-NEXT:       LineNumberEndDelta: 0
79; OBJ32-NEXT:       IsStatement: No
80; OBJ32-NEXT:     ]
81; OBJ32-NEXT:   ]
82; OBJ32-NEXT:   FilenameSegment [
83; OBJ32-NEXT:     Filename: D:\two.c
84; OBJ32-NEXT:     +0x5 [
85; OBJ32-NEXT:       LineNumberStart: 2
86; OBJ32-NEXT:       LineNumberEndDelta: 0
87; OBJ32-NEXT:       IsStatement: No
88; OBJ32-NEXT:     ]
89; OBJ32-NEXT:   ]
90; OBJ32-NEXT:   FilenameSegment [
91; OBJ32-NEXT:     Filename: D:\one.c
92; OBJ32-NEXT:     +0xA [
93; OBJ32-NEXT:       LineNumberStart: 7
94; OBJ32-NEXT:       LineNumberEndDelta: 0
95; OBJ32-NEXT:       IsStatement: No
96; OBJ32-NEXT:     ]
97; OBJ32-NEXT:     +0xF [
98; OBJ32-NEXT:       LineNumberStart: 8
99; OBJ32-NEXT:       LineNumberEndDelta: 0
100; OBJ32-NEXT:       IsStatement: No
101; OBJ32-NEXT:     ]
102; OBJ32-NEXT:   ]
103; OBJ32-NEXT: ]
104
105; X64-LABEL: f:
106; X64-NEXT: .L{{.*}}:{{$}}
107; X64:      .cv_file 1 "D:\\input.c" "70B51F534D80639D033AE92C6A856AF6" 1
108; X64:      .cv_loc 0 1 3 0 is_stmt 0 # input.c:3:0
109; X64:      # %bb.
110; X64:      subq    $40, %rsp
111; X64:      .cv_file 2 "D:\\one.c" "70B51F534D80639D033AE92C6A856AF6" 1
112; X64:      .cv_loc 0 2 1 0 # one.c:1:0
113; X64:      callq   g
114; X64:      .cv_file 3 "D:\\two.c" "70B51F534D80639D033AE92C6A856AF6" 1
115; X64:      .cv_loc 0 3 2 0 # two.c:2:0
116; X64:      callq   g
117; X64:      .cv_loc 0 2 7 0 # one.c:7:0
118; X64:      callq   g
119; X64:      .cv_loc 0 2 8 0 # one.c:8:0
120; X64:      addq    $40, %rsp
121; X64-NEXT: ret
122; X64:      [[END_OF_F:.?Lfunc_end.*]]:
123
124; X64: .cv_linetable 0, f, [[END_OF_F]]
125; X64: .cv_filechecksums
126; X64: .cv_stringtable
127
128; OBJ64:    Section {
129; OBJ64:      Name: .debug$S (2E 64 65 62 75 67 24 53)
130; OBJ64:      Characteristics [ (0x42300040)
131; OBJ64:      ]
132; OBJ64:      Subsection [
133; OBJ64-NEXT:   SubSectionType: Symbols (0xF1)
134; OBJ64:        {{.*}}Proc{{.*}}Sym {
135; OBJ64:          CodeSize: 0x18
136; OBJ64:          DisplayName: f
137; OBJ64:          LinkageName: f
138; OBJ64:        }
139; OBJ64-NEXT:   ProcEnd {
140; OBJ64:        }
141; OBJ64-NEXT: ]
142; OBJ64:	  Subsection [
143; OBJ64:        SubSectionType: FileChecksums (0xF4)
144; OBJ64-NEXT:   SubSectionSize: 0x48
145; OBJ64-NEXT:   FileChecksum {
146; OBJ64-NEXT:     Filename: D:\input.c (0x1)
147; OBJ64-NEXT:     ChecksumSize: 0x10
148; OBJ64-NEXT:     ChecksumKind: MD5 (0x1)
149; OBJ64-NEXT:     ChecksumBytes: (70 B5 1F 53 4D 80 63 9D 03 3A E9 2C 6A 85 6A F6)
150; OBJ64-NEXT:   }
151; OBJ64-NEXT:   FileChecksum {
152; OBJ64-NEXT:     Filename: D:\one.c (0xC)
153; OBJ64-NEXT:     ChecksumSize: 0x10
154; OBJ64-NEXT:     ChecksumKind: MD5 (0x1)
155; OBJ64-NEXT:     ChecksumBytes: (70 B5 1F 53 4D 80 63 9D 03 3A E9 2C 6A 85 6A F6)
156; OBJ64-NEXT:   }
157; OBJ64-NEXT:   FileChecksum {
158; OBJ64-NEXT:     Filename: D:\two.c (0x15)
159; OBJ64-NEXT:     ChecksumSize: 0x10
160; OBJ64-NEXT:     ChecksumKind: MD5 (0x1)
161; OBJ64-NEXT:     ChecksumBytes: (70 B5 1F 53 4D 80 63 9D 03 3A E9 2C 6A 85 6A F6)
162; OBJ64-NEXT:   }
163; OBJ64-NEXT:  ]
164; OBJ64:      FunctionLineTable [
165; OBJ64-NEXT:   Name: f
166; OBJ64-NEXT:   Flags: 0x0
167; OBJ64-NEXT:   CodeSize: 0x18
168; OBJ64-NEXT:   FilenameSegment [
169; OBJ64-NEXT:     Filename: D:\input.c
170; OBJ64-NEXT:     +0x0 [
171; OBJ64-NEXT:       LineNumberStart: 3
172; OBJ64-NEXT:       LineNumberEndDelta: 0
173; OBJ64-NEXT:       IsStatement: No
174; OBJ64-NEXT:     ]
175; OBJ64-NEXT:   ]
176; OBJ64-NEXT:   FilenameSegment [
177; OBJ64-NEXT:     Filename: D:\one.c
178; OBJ64-NEXT:     +0x4 [
179; OBJ64-NEXT:       LineNumberStart: 1
180; OBJ64-NEXT:       LineNumberEndDelta: 0
181; OBJ64-NEXT:       IsStatement: No
182; OBJ64-NEXT:     ]
183; OBJ64-NEXT:   ]
184; OBJ64-NEXT:   FilenameSegment [
185; OBJ64-NEXT:     Filename: D:\two.c
186; OBJ64-NEXT:     +0x9 [
187; OBJ64-NEXT:       LineNumberStart: 2
188; OBJ64-NEXT:       LineNumberEndDelta: 0
189; OBJ64-NEXT:       IsStatement: No
190; OBJ64-NEXT:     ]
191; OBJ64-NEXT:   ]
192; OBJ64-NEXT:   FilenameSegment [
193; OBJ64-NEXT:     Filename: D:\one.c
194; OBJ64-NEXT:     +0xE [
195; OBJ64-NEXT:       LineNumberStart: 7
196; OBJ64-NEXT:       LineNumberEndDelta: 0
197; OBJ64-NEXT:       IsStatement: No
198; OBJ64-NEXT:     ]
199; OBJ64-NEXT:     +0x13 [
200; OBJ64-NEXT:       LineNumberStart: 8
201; OBJ64-NEXT:       LineNumberEndDelta: 0
202; OBJ64-NEXT:       IsStatement: No
203; OBJ64-NEXT:     ]
204; OBJ64-NEXT:   ]
205; OBJ64-NEXT: ]
206
207; Function Attrs: nounwind
208define void @f() #0 !dbg !4 {
209entry:
210  call void @g(), !dbg !12
211  call void @g(), !dbg !15
212  call void @g(), !dbg !18
213  ret void, !dbg !19
214}
215
216declare void @g() #1
217
218attributes #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" }
219attributes #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" }
220
221!llvm.dbg.cu = !{!0}
222!llvm.module.flags = !{!9, !10}
223!llvm.ident = !{!11}
224
225!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)
226!1 = !DIFile(filename: "<unknown>", directory: "D:\5C", checksumkind: CSK_MD5, checksum:"70b51f534d80639d033ae92c6a856af6")
227!2 = !{}
228!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)
229!5 = !DIFile(filename: "input.c", directory: "D:\5C", checksumkind: CSK_MD5, checksum:"70b51f534d80639d033ae92c6a856af6")
230!6 = !DIFile(filename: "input.c", directory: "D:C", checksumkind: CSK_MD5, checksum:"70b51f534d80639d033ae92c6a856af6")
231!7 = !DISubroutineType(types: !8)
232!8 = !{null}
233!9 = !{i32 2, !"CodeView", i32 1}
234!10 = !{i32 1, !"Debug Info Version", i32 3}
235!11 = !{!"clang version 3.5 "}
236!12 = !DILocation(line: 1, scope: !13)
237!13 = !DILexicalBlockFile(discriminator: 0, file: !14, scope: !4)
238!14 = !DIFile(filename: "one.c", directory: "D:\5C", checksumkind: CSK_MD5, checksum:"70b51f534d80639d033ae92c6a856af6")
239!15 = !DILocation(line: 2, scope: !16)
240!16 = !DILexicalBlockFile(discriminator: 0, file: !17, scope: !4)
241!17 = !DIFile(filename: "two.c", directory: "D:\5C", checksumkind: CSK_MD5, checksum:"70b51f534d80639d033ae92c6a856af6")
242!18 = !DILocation(line: 7, scope: !13)
243!19 = !DILocation(line: 8, scope: !13)
244