blob: ef6e869a8c36b04fd5e01b33fae532d6865a6165 [file] [log] [blame]
Reid Kleckner72fde092016-02-11 19:44:26 +00001; RUN: llc -mcpu=core2 -mtriple=i686-pc-win32 < %s -filetype=obj | llvm-readobj -codeview | FileCheck %s --check-prefix=OBJ
2
3; This LL file was generated by running 'clang -O1 -g -gcodeview' on the
4; following code:
5; int volatile x;
6; static inline void f() {
7; ++x;
8; }
9; static inline void g() {
10; f();
11; }
12; static inline void h() {
13; g();
14; }
15; int main() {
16; h();
17; }
18
19; OBJ: Subsection [
20; OBJ: SubSectionType: Symbols (0xF1)
21; OBJ: ProcStart {
22; OBJ: InlineSite {
23; OBJ: Inlinee: h (0x1003)
24; OBJ: }
25; OBJ: InlineSite {
26; OBJ: Inlinee: g (0x1004)
27; OBJ: }
28; OBJ: InlineSite {
29; OBJ: Inlinee: f (0x1005)
30; OBJ: }
31; OBJ: InlineSiteEnd {
32; OBJ: }
33; OBJ: InlineSiteEnd {
34; OBJ: }
35; OBJ: InlineSiteEnd {
36; OBJ: }
37; OBJ: ProcEnd
38; OBJ: ]
39
40; ModuleID = 't.cpp'
41target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
42target triple = "x86_64-pc-windows-msvc18.0.0"
43
44@"\01?x@@3HC" = global i32 0, align 4
45
46; Function Attrs: norecurse nounwind uwtable
47define i32 @main() #0 !dbg !4 {
48entry:
49 %0 = load volatile i32, i32* @"\01?x@@3HC", align 4, !dbg !20, !tbaa !24
50 %inc.i.i.i = add nsw i32 %0, 1, !dbg !20
51 store volatile i32 %inc.i.i.i, i32* @"\01?x@@3HC", align 4, !dbg !20, !tbaa !24
52 ret i32 0, !dbg !28
53}
54
55attributes #0 = { norecurse nounwind uwtable "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2" "unsafe-fp-math"="false" "use-soft-float"="false" }
56
57!llvm.dbg.cu = !{!0}
58!llvm.module.flags = !{!16, !17, !18}
59!llvm.ident = !{!19}
60
61!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.9.0 ", isOptimized: true, runtimeVersion: 0, emissionKind: 1, enums: !2, subprograms: !3, globals: !13)
62!1 = !DIFile(filename: "t.cpp", directory: "D:\5Csrc\5Cllvm\5Cbuild")
63!2 = !{}
64!3 = !{!4, !8, !11, !12}
65!4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 12, type: !5, isLocal: false, isDefinition: true, scopeLine: 12, flags: DIFlagPrototyped, isOptimized: true, variables: !2)
66!5 = !DISubroutineType(types: !6)
67!6 = !{!7}
68!7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
69!8 = distinct !DISubprogram(name: "h", linkageName: "\01?h@@YAXXZ", scope: !1, file: !1, line: 9, type: !9, isLocal: true, isDefinition: true, scopeLine: 9, flags: DIFlagPrototyped, isOptimized: true, variables: !2)
70!9 = !DISubroutineType(types: !10)
71!10 = !{null}
72!11 = distinct !DISubprogram(name: "g", linkageName: "\01?g@@YAXXZ", scope: !1, file: !1, line: 6, type: !9, isLocal: true, isDefinition: true, scopeLine: 6, flags: DIFlagPrototyped, isOptimized: true, variables: !2)
73!12 = distinct !DISubprogram(name: "f", linkageName: "\01?f@@YAXXZ", scope: !1, file: !1, line: 2, type: !9, isLocal: true, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, variables: !2)
74!13 = !{!14}
75!14 = !DIGlobalVariable(name: "x", linkageName: "\01?x@@3HC", scope: !0, file: !1, line: 1, type: !15, isLocal: false, isDefinition: true, variable: i32* @"\01?x@@3HC")
76!15 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !7)
77!16 = !{i32 2, !"CodeView", i32 1}
78!17 = !{i32 2, !"Debug Info Version", i32 3}
79!18 = !{i32 1, !"PIC Level", i32 2}
80!19 = !{!"clang version 3.9.0 "}
81!20 = !DILocation(line: 4, column: 3, scope: !12, inlinedAt: !21)
82!21 = distinct !DILocation(line: 7, column: 3, scope: !11, inlinedAt: !22)
83!22 = distinct !DILocation(line: 10, column: 3, scope: !8, inlinedAt: !23)
84!23 = distinct !DILocation(line: 13, column: 3, scope: !4)
85!24 = !{!25, !25, i64 0}
86!25 = !{!"int", !26, i64 0}
87!26 = !{!"omnipotent char", !27, i64 0}
88!27 = !{!"Simple C/C++ TBAA"}
89!28 = !DILocation(line: 14, column: 1, scope: !4)