1 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2 target triple = "x86_64-pc-linux-gnu"
4 @gBar = local_unnamed_addr global i32 2, align 4, !dbg !0
5 @gFoo = internal unnamed_addr global i32 1, align 4, !dbg !6
7 ; Function Attrs: norecurse nounwind readonly
8 define i32 @foo() local_unnamed_addr #0 !dbg !14 {
9 %1 = load i32, i32* @gFoo, align 4, !dbg !17
13 ; Function Attrs: norecurse nounwind readonly
14 define i32 @bar() local_unnamed_addr #0 !dbg !19 {
15 %1 = load i32, i32* @gBar, align 4, !dbg !20
19 define void @baz() local_unnamed_addr !dbg !22 {
20 %1 = tail call i32 @rand(), !dbg !25
21 store i32 %1, i32* @gFoo, align 4, !dbg !26
22 %2 = tail call i32 @rand(), !dbg !27
23 store i32 %2, i32* @gBar, align 4, !dbg !28
27 declare i32 @rand() local_unnamed_addr
29 attributes #0 = { norecurse nounwind readonly }
32 !llvm.module.flags = !{!9, !10, !11, !12}
35 !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
36 !1 = distinct !DIGlobalVariable(name: "gBar", scope: !2, file: !3, line: 4, type: !8, isLocal: false, isDefinition: true)
37 !2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 7.0.0 (trunk 332246)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5)
38 !3 = !DIFile(filename: "foo.c", directory: "/data/work/lto/roref/test")
41 !6 = !DIGlobalVariableExpression(var: !7, expr: !DIExpression())
42 !7 = distinct !DIGlobalVariable(name: "gFoo", scope: !2, file: !3, line: 3, type: !8, isLocal: true, isDefinition: true)
43 !8 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
44 !9 = !{i32 2, !"Dwarf Version", i32 4}
45 !10 = !{i32 2, !"Debug Info Version", i32 3}
46 !11 = !{i32 1, !"wchar_size", i32 4}
47 !12 = !{i32 7, !"PIC Level", i32 2}
48 !13 = !{!"clang version 7.0.0 (trunk 332246)"}
49 !14 = distinct !DISubprogram(name: "foo", scope: !3, file: !3, line: 6, type: !15, isLocal: false, isDefinition: true, scopeLine: 6, isOptimized: true, unit: !2, retainedNodes: !4)
50 !15 = !DISubroutineType(types: !16)
52 !17 = !DILocation(line: 7, column: 10, scope: !14)
53 !18 = !DILocation(line: 7, column: 3, scope: !14)
54 !19 = distinct !DISubprogram(name: "bar", scope: !3, file: !3, line: 10, type: !15, isLocal: false, isDefinition: true, scopeLine: 10, isOptimized: true, unit: !2, retainedNodes: !4)
55 !20 = !DILocation(line: 11, column: 10, scope: !19)
56 !21 = !DILocation(line: 11, column: 3, scope: !19)
57 !22 = distinct !DISubprogram(name: "baz", scope: !3, file: !3, line: 14, type: !23, isLocal: false, isDefinition: true, scopeLine: 14, isOptimized: true, unit: !2, retainedNodes: !4)
58 !23 = !DISubroutineType(types: !24)
60 !25 = !DILocation(line: 15, column: 10, scope: !22)
61 !26 = !DILocation(line: 15, column: 8, scope: !22)
62 !27 = !DILocation(line: 16, column: 10, scope: !22)
63 !28 = !DILocation(line: 16, column: 8, scope: !22)
64 !29 = !DILocation(line: 17, column: 1, scope: !22)