DI: Remove DW_TAG_arg_variable and DW_TAG_auto_variable
[oota-llvm.git] / test / Linker / Inputs / type-unique-inheritance-b.ll
1 ; ModuleID = 'bar.cpp'
2
3 %class.B = type { i32, %class.A* }
4 %class.A = type { %class.Base, i32 }
5 %class.Base = type { i32 }
6
7 ; Function Attrs: nounwind ssp uwtable
8 define void @_Z1gi(i32 %a) #0 {
9 entry:
10   %a.addr = alloca i32, align 4
11   %t = alloca %class.B, align 8
12   store i32 %a, i32* %a.addr, align 4
13   call void @llvm.dbg.declare(metadata i32* %a.addr, metadata !28, metadata !DIExpression()), !dbg !29
14   call void @llvm.dbg.declare(metadata %class.B* %t, metadata !30, metadata !DIExpression()), !dbg !31
15   ret void, !dbg !32
16 }
17
18 ; Function Attrs: nounwind readnone
19 declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
20
21 ; Function Attrs: ssp uwtable
22 define i32 @main() #2 {
23 entry:
24   %retval = alloca i32, align 4
25   %a = alloca %class.A, align 4
26   store i32 0, i32* %retval
27   call void @llvm.dbg.declare(metadata %class.A* %a, metadata !33, metadata !DIExpression()), !dbg !34
28   call void @_Z1fi(i32 0), !dbg !35
29   call void @_Z1gi(i32 1), !dbg !36
30   ret i32 0, !dbg !37
31 }
32
33 declare void @_Z1fi(i32) #3
34
35 attributes #0 = { nounwind ssp uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
36 attributes #1 = { nounwind readnone }
37 attributes #2 = { ssp uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
38 attributes #3 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
39
40 !llvm.dbg.cu = !{!0}
41 !llvm.module.flags = !{!27, !38}
42
43 !0 = !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 (http://llvm.org/git/clang.git f54e02f969d02d640103db73efc30c45439fceab) (http://llvm.org/git/llvm.git 284353b55896cb1babfaa7add7c0a363245342d2)", isOptimized: false, emissionKind: 0, file: !1, enums: !2, retainedTypes: !3, subprograms: !19, globals: !2, imports: !2)
44 !1 = !DIFile(filename: "bar.cpp", directory: "/Users/mren/c_testing/type_unique_air/inher")
45 !2 = !{}
46 !3 = !{!4, !11, !15}
47 !4 = !DICompositeType(tag: DW_TAG_class_type, name: "B", line: 7, size: 128, align: 64, file: !5, elements: !6, identifier: "_ZTS1B")
48 !5 = !DIFile(filename: "./b.hpp", directory: "/Users/mren/c_testing/type_unique_air/inher")
49 !6 = !{!7, !9}
50 !7 = !DIDerivedType(tag: DW_TAG_member, name: "bb", line: 8, size: 32, align: 32, flags: DIFlagPrivate, file: !5, scope: !"_ZTS1B", baseType: !8)
51 !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
52 !9 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 9, size: 64, align: 64, offset: 64, flags: DIFlagPrivate, file: !5, scope: !"_ZTS1B", baseType: !10)
53 !10 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !11)
54 !11 = !DICompositeType(tag: DW_TAG_class_type, name: "A", line: 3, size: 64, align: 32, file: !12, elements: !13, identifier: "_ZTS1A")
55 !12 = !DIFile(filename: "./a.hpp", directory: "/Users/mren/c_testing/type_unique_air/inher")
56 !13 = !{!14, !18}
57 !14 = !DIDerivedType(tag: DW_TAG_inheritance, flags: DIFlagPrivate, scope: !"_ZTS1A", baseType: !15)
58 !15 = !DICompositeType(tag: DW_TAG_class_type, name: "Base", line: 3, size: 32, align: 32, file: !5, elements: !16, identifier: "_ZTS4Base")
59 !16 = !{!17}
60 !17 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 4, size: 32, align: 32, flags: DIFlagPrivate, file: !5, scope: !"_ZTS4Base", baseType: !8)
61 !18 = !DIDerivedType(tag: DW_TAG_member, name: "x", line: 4, size: 32, align: 32, offset: 32, flags: DIFlagPrivate, file: !12, scope: !"_ZTS1A", baseType: !8)
62 !19 = !{!20, !24}
63 !20 = !DISubprogram(name: "g", linkageName: "_Z1gi", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !1, scope: !21, type: !22, function: void (i32)* @_Z1gi, variables: !2)
64 !21 = !DIFile(filename: "bar.cpp", directory: "/Users/mren/c_testing/type_unique_air/inher")
65 !22 = !DISubroutineType(types: !23)
66 !23 = !{null, !8}
67 !24 = !DISubprogram(name: "main", line: 9, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 9, file: !1, scope: !21, type: !25, function: i32 ()* @main, variables: !2)
68 !25 = !DISubroutineType(types: !26)
69 !26 = !{!8}
70 !27 = !{i32 2, !"Dwarf Version", i32 2}
71 !28 = !DILocalVariable(name: "a", line: 4, arg: 1, scope: !20, file: !21, type: !8)
72 !29 = !DILocation(line: 4, scope: !20)
73 !30 = !DILocalVariable(name: "t", line: 5, scope: !20, file: !21, type: !4)
74 !31 = !DILocation(line: 5, scope: !20)
75 !32 = !DILocation(line: 6, scope: !20)
76 !33 = !DILocalVariable(name: "a", line: 10, scope: !24, file: !21, type: !11)
77 !34 = !DILocation(line: 10, scope: !24)
78 !35 = !DILocation(line: 11, scope: !24)
79 !36 = !DILocation(line: 12, scope: !24)
80 !37 = !DILocation(line: 13, scope: !24)
81 !38 = !{i32 1, !"Debug Info Version", i32 3}