xref: /aosp_15_r20/external/llvm/test/DebugInfo/COFF/inlining-levels.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc -mcpu=core2 -mtriple=i686-pc-win32 < %s -filetype=obj | llvm-readobj -codeview | FileCheck %s --check-prefix=OBJ
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker; This LL file was generated by running 'clang -O1 -g -gcodeview' on the
4*9880d681SAndroid Build Coastguard Worker; following code:
5*9880d681SAndroid Build Coastguard Worker; int volatile x;
6*9880d681SAndroid Build Coastguard Worker; static inline void f() {
7*9880d681SAndroid Build Coastguard Worker;   ++x;
8*9880d681SAndroid Build Coastguard Worker; }
9*9880d681SAndroid Build Coastguard Worker; static inline void g() {
10*9880d681SAndroid Build Coastguard Worker;   f();
11*9880d681SAndroid Build Coastguard Worker; }
12*9880d681SAndroid Build Coastguard Worker; static inline void h() {
13*9880d681SAndroid Build Coastguard Worker;   g();
14*9880d681SAndroid Build Coastguard Worker; }
15*9880d681SAndroid Build Coastguard Worker; int main() {
16*9880d681SAndroid Build Coastguard Worker;   h();
17*9880d681SAndroid Build Coastguard Worker; }
18*9880d681SAndroid Build Coastguard Worker
19*9880d681SAndroid Build Coastguard Worker; OBJ: Subsection [
20*9880d681SAndroid Build Coastguard Worker; OBJ:   SubSectionType: Symbols (0xF1)
21*9880d681SAndroid Build Coastguard Worker; OBJ:   ProcStart {
22*9880d681SAndroid Build Coastguard Worker; OBJ:   InlineSite {
23*9880d681SAndroid Build Coastguard Worker; OBJ:     Inlinee: h (0x1004)
24*9880d681SAndroid Build Coastguard Worker; OBJ:   }
25*9880d681SAndroid Build Coastguard Worker; OBJ:   InlineSite {
26*9880d681SAndroid Build Coastguard Worker; OBJ:     Inlinee: g (0x1003)
27*9880d681SAndroid Build Coastguard Worker; OBJ:   }
28*9880d681SAndroid Build Coastguard Worker; OBJ:   InlineSite {
29*9880d681SAndroid Build Coastguard Worker; OBJ:     Inlinee: f (0x1002)
30*9880d681SAndroid Build Coastguard Worker; OBJ:   }
31*9880d681SAndroid Build Coastguard Worker; OBJ:   InlineSiteEnd {
32*9880d681SAndroid Build Coastguard Worker; OBJ:   }
33*9880d681SAndroid Build Coastguard Worker; OBJ:   InlineSiteEnd {
34*9880d681SAndroid Build Coastguard Worker; OBJ:   }
35*9880d681SAndroid Build Coastguard Worker; OBJ:   InlineSiteEnd {
36*9880d681SAndroid Build Coastguard Worker; OBJ:   }
37*9880d681SAndroid Build Coastguard Worker; OBJ:   ProcEnd
38*9880d681SAndroid Build Coastguard Worker; OBJ: ]
39*9880d681SAndroid Build Coastguard Worker
40*9880d681SAndroid Build Coastguard Worker; ModuleID = 't.cpp'
41*9880d681SAndroid Build Coastguard Workertarget datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
42*9880d681SAndroid Build Coastguard Workertarget triple = "x86_64-pc-windows-msvc18.0.0"
43*9880d681SAndroid Build Coastguard Worker
44*9880d681SAndroid Build Coastguard Worker@"\01?x@@3HC" = global i32 0, align 4
45*9880d681SAndroid Build Coastguard Worker
46*9880d681SAndroid Build Coastguard Worker; Function Attrs: norecurse nounwind uwtable
47*9880d681SAndroid Build Coastguard Workerdefine i32 @main() #0 !dbg !4 {
48*9880d681SAndroid Build Coastguard Workerentry:
49*9880d681SAndroid Build Coastguard Worker  %0 = load volatile i32, i32* @"\01?x@@3HC", align 4, !dbg !20, !tbaa !24
50*9880d681SAndroid Build Coastguard Worker  %inc.i.i.i = add nsw i32 %0, 1, !dbg !20
51*9880d681SAndroid Build Coastguard Worker  store volatile i32 %inc.i.i.i, i32* @"\01?x@@3HC", align 4, !dbg !20, !tbaa !24
52*9880d681SAndroid Build Coastguard Worker  ret i32 0, !dbg !28
53*9880d681SAndroid Build Coastguard Worker}
54*9880d681SAndroid Build Coastguard Worker
55*9880d681SAndroid Build Coastguard Workerattributes #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*9880d681SAndroid Build Coastguard Worker
57*9880d681SAndroid Build Coastguard Worker!llvm.dbg.cu = !{!0}
58*9880d681SAndroid Build Coastguard Worker!llvm.module.flags = !{!16, !17, !18}
59*9880d681SAndroid Build Coastguard Worker!llvm.ident = !{!19}
60*9880d681SAndroid Build Coastguard Worker
61*9880d681SAndroid Build Coastguard Worker!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.9.0 ", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, globals: !13)
62*9880d681SAndroid Build Coastguard Worker!1 = !DIFile(filename: "t.cpp", directory: "D:\5Csrc\5Cllvm\5Cbuild")
63*9880d681SAndroid Build Coastguard Worker!2 = !{}
64*9880d681SAndroid Build Coastguard Worker!4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 12, type: !5, isLocal: false, isDefinition: true, scopeLine: 12, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !2)
65*9880d681SAndroid Build Coastguard Worker!5 = !DISubroutineType(types: !6)
66*9880d681SAndroid Build Coastguard Worker!6 = !{!7}
67*9880d681SAndroid Build Coastguard Worker!7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
68*9880d681SAndroid Build Coastguard Worker!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, unit: !0, variables: !2)
69*9880d681SAndroid Build Coastguard Worker!9 = !DISubroutineType(types: !10)
70*9880d681SAndroid Build Coastguard Worker!10 = !{null}
71*9880d681SAndroid Build Coastguard Worker!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, unit: !0, variables: !2)
72*9880d681SAndroid Build Coastguard Worker!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, unit: !0, variables: !2)
73*9880d681SAndroid Build Coastguard Worker!13 = !{!14}
74*9880d681SAndroid Build Coastguard Worker!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")
75*9880d681SAndroid Build Coastguard Worker!15 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !7)
76*9880d681SAndroid Build Coastguard Worker!16 = !{i32 2, !"CodeView", i32 1}
77*9880d681SAndroid Build Coastguard Worker!17 = !{i32 2, !"Debug Info Version", i32 3}
78*9880d681SAndroid Build Coastguard Worker!18 = !{i32 1, !"PIC Level", i32 2}
79*9880d681SAndroid Build Coastguard Worker!19 = !{!"clang version 3.9.0 "}
80*9880d681SAndroid Build Coastguard Worker!20 = !DILocation(line: 4, column: 3, scope: !12, inlinedAt: !21)
81*9880d681SAndroid Build Coastguard Worker!21 = distinct !DILocation(line: 7, column: 3, scope: !11, inlinedAt: !22)
82*9880d681SAndroid Build Coastguard Worker!22 = distinct !DILocation(line: 10, column: 3, scope: !8, inlinedAt: !23)
83*9880d681SAndroid Build Coastguard Worker!23 = distinct !DILocation(line: 13, column: 3, scope: !4)
84*9880d681SAndroid Build Coastguard Worker!24 = !{!25, !25, i64 0}
85*9880d681SAndroid Build Coastguard Worker!25 = !{!"int", !26, i64 0}
86*9880d681SAndroid Build Coastguard Worker!26 = !{!"omnipotent char", !27, i64 0}
87*9880d681SAndroid Build Coastguard Worker!27 = !{!"Simple C/C++ TBAA"}
88*9880d681SAndroid Build Coastguard Worker!28 = !DILocation(line: 14, column: 1, scope: !4)
89