blob: f9b194f064169fe77049ff5ac1633b6b3c3370c9 [file] [log] [blame]
Reid Kleckner344078f2016-02-19 23:55:38 +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; volatile int x;
5; static inline void file_change(void) {
6; x++;
7; #include "t.inc"
8; x++;
9; }
10; void f(void) {
11; ++x;
12; file_change();
13; ++x;
14; }
15; t.inc contents:
16; ++x;
17; ++x;
18
19; OBJ: Subsection [
20; OBJ: SubSectionType: Symbols (0xF1)
21; OBJ: ProcStart {
22; OBJ: DisplayName: f
23; OBJ: }
24; OBJ: InlineSite {
25; OBJ: PtrParent: 0x0
26; OBJ: PtrEnd: 0x0
Reid Klecknerfbd77872016-03-18 18:54:32 +000027; OBJ: Inlinee: file_change (0x1002)
Reid Kleckner344078f2016-02-19 23:55:38 +000028; OBJ: BinaryAnnotations [
29; OBJ: ChangeCodeOffsetAndLineOffset: {CodeOffset: 0x6, LineOffset: 1}
30; OBJ: ChangeFile: D:\src\llvm\build\t.inc (0x8)
31; OBJ: ChangeCodeOffsetAndLineOffset: {CodeOffset: 0x6, LineOffset: -2}
32; OBJ: ChangeCodeOffsetAndLineOffset: {CodeOffset: 0x6, LineOffset: 1}
33; OBJ: ChangeFile: D:\src\llvm\build\t.cpp (0x0)
34; OBJ: ChangeCodeOffsetAndLineOffset: {CodeOffset: 0x6, LineOffset: 3}
35; OBJ: ChangeCodeLength: 0x6
36; OBJ: ]
37; OBJ: }
38; OBJ: InlineSiteEnd {
39; OBJ: }
40; OBJ: ProcEnd
41; OBJ: ]
42
43; ModuleID = 't.cpp'
44target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
45target triple = "x86_64-pc-windows-msvc18.0.0"
46
Peter Collingbourned4135bb2016-09-13 01:12:59 +000047@x = common global i32 0, align 4, !dbg !9
Reid Kleckner344078f2016-02-19 23:55:38 +000048
49; Function Attrs: norecurse nounwind uwtable
50define void @f() #0 !dbg !4 {
51entry:
52 %0 = load volatile i32, i32* @x, align 4, !dbg !16, !tbaa !17
53 %inc = add nsw i32 %0, 1, !dbg !16
54 store volatile i32 %inc, i32* @x, align 4, !dbg !16, !tbaa !17
55 %1 = load volatile i32, i32* @x, align 4, !dbg !21, !tbaa !17
56 %inc.i = add nsw i32 %1, 1, !dbg !21
57 store volatile i32 %inc.i, i32* @x, align 4, !dbg !21, !tbaa !17
58 %2 = load volatile i32, i32* @x, align 4, !dbg !23, !tbaa !17
59 %inc1.i = add nsw i32 %2, 1, !dbg !23
60 store volatile i32 %inc1.i, i32* @x, align 4, !dbg !23, !tbaa !17
61 %3 = load volatile i32, i32* @x, align 4, !dbg !26, !tbaa !17
62 %inc2.i = add nsw i32 %3, 1, !dbg !26
63 store volatile i32 %inc2.i, i32* @x, align 4, !dbg !26, !tbaa !17
64 %4 = load volatile i32, i32* @x, align 4, !dbg !27, !tbaa !17
65 %inc3.i = add nsw i32 %4, 1, !dbg !27
66 store volatile i32 %inc3.i, i32* @x, align 4, !dbg !27, !tbaa !17
67 %5 = load volatile i32, i32* @x, align 4, !dbg !29, !tbaa !17
68 %inc1 = add nsw i32 %5, 1, !dbg !29
69 store volatile i32 %inc1, i32* @x, align 4, !dbg !29, !tbaa !17
70 ret void, !dbg !30
71}
72
73attributes #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" }
74
75!llvm.dbg.cu = !{!0}
76!llvm.module.flags = !{!12, !13, !14}
77!llvm.ident = !{!15}
78
Adrian Prantl75819ae2016-04-15 15:57:41 +000079!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 ", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, globals: !8)
Reid Kleckner344078f2016-02-19 23:55:38 +000080!1 = !DIFile(filename: "t.cpp", directory: "D:\5Csrc\5Cllvm\5Cbuild")
81!2 = !{}
Adrian Prantl75819ae2016-04-15 15:57:41 +000082!4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 7, type: !5, isLocal: false, isDefinition: true, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !2)
Reid Kleckner344078f2016-02-19 23:55:38 +000083!5 = !DISubroutineType(types: !6)
84!6 = !{null}
Adrian Prantl75819ae2016-04-15 15:57:41 +000085!7 = distinct !DISubprogram(name: "file_change", scope: !1, file: !1, line: 2, type: !5, isLocal: true, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !2)
Reid Kleckner344078f2016-02-19 23:55:38 +000086!8 = !{!9}
Adrian Prantlbceaaa92016-12-20 02:09:43 +000087!9 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "x", scope: !0, file: !1, line: 1, type: !10, isLocal: false, isDefinition: true))
Reid Kleckner344078f2016-02-19 23:55:38 +000088!10 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !11)
89!11 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
90!12 = !{i32 2, !"CodeView", i32 1}
91!13 = !{i32 2, !"Debug Info Version", i32 3}
92!14 = !{i32 1, !"PIC Level", i32 2}
93!15 = !{!"clang version 3.9.0 "}
94!16 = !DILocation(line: 8, column: 3, scope: !4)
95!17 = !{!18, !18, i64 0}
96!18 = !{!"int", !19, i64 0}
97!19 = !{!"omnipotent char", !20, i64 0}
98!20 = !{!"Simple C/C++ TBAA"}
99!21 = !DILocation(line: 3, column: 4, scope: !7, inlinedAt: !22)
100!22 = distinct !DILocation(line: 9, column: 3, scope: !4)
101!23 = !DILocation(line: 1, column: 1, scope: !24, inlinedAt: !22)
102!24 = !DILexicalBlockFile(scope: !7, file: !25, discriminator: 0)
103!25 = !DIFile(filename: "./t.inc", directory: "D:\5Csrc\5Cllvm\5Cbuild")
104!26 = !DILocation(line: 2, column: 1, scope: !24, inlinedAt: !22)
105!27 = !DILocation(line: 5, column: 4, scope: !28, inlinedAt: !22)
106!28 = !DILexicalBlockFile(scope: !7, file: !1, discriminator: 0)
107!29 = !DILocation(line: 10, column: 3, scope: !4)
108!30 = !DILocation(line: 11, column: 1, scope: !4)