blob: 0a52d7ed55636cc49dd37ccd6e9e3341e36b1744 [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)
Reid Kleckner8d8888f2017-07-11 23:41:41 +000021; OBJ: {{.*}}Proc{{.*}}Sym {
22; OBJ: InlineSiteSym {
Reid Klecknera9f4cc92016-09-07 16:15:31 +000023; OBJ: Inlinee: h (0x1002)
Reid Kleckner72fde092016-02-11 19:44:26 +000024; OBJ: }
Reid Kleckner8d8888f2017-07-11 23:41:41 +000025; OBJ: InlineSiteSym {
Reid Klecknerfbd77872016-03-18 18:54:32 +000026; OBJ: Inlinee: g (0x1003)
Reid Kleckner72fde092016-02-11 19:44:26 +000027; OBJ: }
Reid Kleckner8d8888f2017-07-11 23:41:41 +000028; OBJ: InlineSiteSym {
Reid Klecknera9f4cc92016-09-07 16:15:31 +000029; OBJ: Inlinee: f (0x1004)
Reid Kleckner72fde092016-02-11 19:44:26 +000030; 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'
Adrian Prantl1eadba12016-12-22 00:45:21 +000041source_filename = "test/DebugInfo/COFF/inlining-levels.ll"
Reid Kleckner72fde092016-02-11 19:44:26 +000042target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
43target triple = "x86_64-pc-windows-msvc18.0.0"
44
Adrian Prantl1eadba12016-12-22 00:45:21 +000045@"\01?x@@3HC" = global i32 0, align 4, !dbg !0
Reid Kleckner72fde092016-02-11 19:44:26 +000046
47; Function Attrs: norecurse nounwind uwtable
Adrian Prantl1eadba12016-12-22 00:45:21 +000048define i32 @main() #0 !dbg !12 {
Reid Kleckner72fde092016-02-11 19:44:26 +000049entry:
Adrian Prantl1eadba12016-12-22 00:45:21 +000050 %0 = load volatile i32, i32* @"\01?x@@3HC", align 4, !dbg !15, !tbaa !24
51 %inc.i.i.i = add nsw i32 %0, 1, !dbg !15
52 store volatile i32 %inc.i.i.i, i32* @"\01?x@@3HC", align 4, !dbg !15, !tbaa !24
Reid Kleckner72fde092016-02-11 19:44:26 +000053 ret i32 0, !dbg !28
54}
55
56attributes #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" }
57
Adrian Prantl1eadba12016-12-22 00:45:21 +000058!llvm.dbg.cu = !{!2}
59!llvm.module.flags = !{!8, !9, !10}
60!llvm.ident = !{!11}
Reid Kleckner72fde092016-02-11 19:44:26 +000061
Adrian Prantl05782212017-08-30 18:06:51 +000062!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
Adrian Prantl1eadba12016-12-22 00:45:21 +000063!1 = !DIGlobalVariable(name: "x", linkageName: "\01?x@@3HC", scope: !2, file: !3, line: 1, type: !6, isLocal: false, isDefinition: true)
64!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 3.9.0 ", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5)
65!3 = !DIFile(filename: "t.cpp", directory: "D:\5Csrc\5Cllvm\5Cbuild")
66!4 = !{}
67!5 = !{!0}
68!6 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !7)
Reid Kleckner72fde092016-02-11 19:44:26 +000069!7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
Adrian Prantl1eadba12016-12-22 00:45:21 +000070!8 = !{i32 2, !"CodeView", i32 1}
71!9 = !{i32 2, !"Debug Info Version", i32 3}
72!10 = !{i32 1, !"PIC Level", i32 2}
73!11 = !{!"clang version 3.9.0 "}
74!12 = distinct !DISubprogram(name: "main", scope: !3, file: !3, line: 12, type: !13, isLocal: false, isDefinition: true, scopeLine: 12, flags: DIFlagPrototyped, isOptimized: true, unit: !2, variables: !4)
75!13 = !DISubroutineType(types: !14)
76!14 = !{!7}
77!15 = !DILocation(line: 4, column: 3, scope: !16, inlinedAt: !19)
78!16 = distinct !DISubprogram(name: "f", linkageName: "\01?f@@YAXXZ", scope: !3, file: !3, line: 2, type: !17, isLocal: true, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, unit: !2, variables: !4)
79!17 = !DISubroutineType(types: !18)
80!18 = !{null}
81!19 = distinct !DILocation(line: 7, column: 3, scope: !20, inlinedAt: !21)
82!20 = distinct !DISubprogram(name: "g", linkageName: "\01?g@@YAXXZ", scope: !3, file: !3, line: 6, type: !17, isLocal: true, isDefinition: true, scopeLine: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, variables: !4)
83!21 = distinct !DILocation(line: 10, column: 3, scope: !22, inlinedAt: !23)
84!22 = distinct !DISubprogram(name: "h", linkageName: "\01?h@@YAXXZ", scope: !3, file: !3, line: 9, type: !17, isLocal: true, isDefinition: true, scopeLine: 9, flags: DIFlagPrototyped, isOptimized: true, unit: !2, variables: !4)
85!23 = distinct !DILocation(line: 13, column: 3, scope: !12)
Reid Kleckner72fde092016-02-11 19:44:26 +000086!24 = !{!25, !25, i64 0}
87!25 = !{!"int", !26, i64 0}
88!26 = !{!"omnipotent char", !27, i64 0}
89!27 = !{!"Simple C/C++ TBAA"}
Adrian Prantl1eadba12016-12-22 00:45:21 +000090!28 = !DILocation(line: 14, column: 1, scope: !12)
91