3 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
4 target triple = "x86_64-unknown-linux-gnu"
9 @.str = private unnamed_addr constant [1 x i8] zeroinitializer, align 1
10 @.str.1 = private unnamed_addr constant [6 x i8] c"false\00", align 1
12 define void @_Z11PrintVectorv() local_unnamed_addr #0 !dbg !6 {
14 %agg.tmp.i.i = alloca %class.A, align 1
15 %text.i = alloca %class.A, align 1
16 %v = alloca %class.B, align 1
17 call void @llvm.lifetime.start(i64 1, ptr %v) #4, !dbg !40
18 br label %for.cond, !dbg !65
20 for.cond: ; preds = %for.cond, %entry
21 call void @llvm.dbg.value(metadata ptr %v, metadata !29, metadata !66), !dbg !67
22 %call = call double @_ZN1BixEj(ptr nonnull %v, i32 undef), !dbg !68
23 call void @llvm.dbg.value(metadata double %call, metadata !49, metadata !69), !dbg !70
24 call void @llvm.dbg.value(metadata ptr null, metadata !52, metadata !69), !dbg !71
25 call void @llvm.dbg.value(metadata ptr undef, metadata !54, metadata !69), !dbg !72
26 call void @llvm.lifetime.start(i64 1, ptr %text.i) #4, !dbg !41
27 %tobool.i = fcmp une double %call, 0.000000e+00, !dbg !73
28 %cond.i = select i1 %tobool.i, ptr @.str, ptr @.str.1, !dbg !73
29 call void @llvm.dbg.value(metadata ptr %text.i, metadata !55, metadata !66), !dbg !74
30 call void @llvm.lifetime.start(i64 1, ptr %agg.tmp.i.i), !dbg !59
31 call void @llvm.dbg.value(metadata ptr %text.i, metadata !62, metadata !69), !dbg !59
32 call void @llvm.dbg.value(metadata ptr %cond.i, metadata !63, metadata !69), !dbg !75
33 call void @_ZN1AC1EPKc(ptr nonnull %agg.tmp.i.i, ptr %cond.i), !dbg !76
34 call void @_ZN1A5m_fn1ES_(ptr nonnull %text.i), !dbg !77
35 call void @llvm.lifetime.end(i64 1, ptr %agg.tmp.i.i), !dbg !79
36 call void @llvm.lifetime.end(i64 1, ptr %text.i) #4, !dbg !80
37 br label %for.cond, !dbg !81, !llvm.loop !82
40 ; Function Attrs: argmemonly nounwind
41 declare void @llvm.lifetime.start(i64, ptr nocapture) #1
43 declare double @_ZN1BixEj(ptr, i32) local_unnamed_addr #2
45 ; Function Attrs: argmemonly nounwind
46 declare void @llvm.lifetime.end(i64, ptr nocapture) #1
48 declare void @_ZN1A5m_fn1ES_(ptr) local_unnamed_addr #2
50 declare void @_ZN1AC1EPKc(ptr, ptr) unnamed_addr #2
52 ; Function Attrs: nounwind readnone
53 declare void @llvm.dbg.value(metadata, metadata, metadata) #3
55 attributes #0 = { noreturn uwtable "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="none" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
56 attributes #1 = { argmemonly nounwind }
57 attributes #2 = { "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="none" "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,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
58 attributes #3 = { nounwind readnone }
59 attributes #4 = { nounwind }
62 !llvm.module.flags = !{!3, !4}
65 !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.9.0 (trunk 273450) (llvm/trunk 273521)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
66 !1 = !DIFile(filename: "/usr/local/google/home/niravd/bug_28270.c", directory: "/usr/local/google/home/niravd/build/llvm/build_debug")
68 !3 = !{i32 2, !"Dwarf Version", i32 4}
69 !4 = !{i32 2, !"Debug Info Version", i32 3}
70 !5 = !{!"clang version 3.9.0 (trunk 273450) (llvm/trunk 273521)"}
71 !6 = distinct !DISubprogram(name: "PrintVector", linkageName: "_Z11PrintVectorv", scope: !1, file: !1, line: 18, type: !7, isLocal: false, isDefinition: true, scopeLine: 18, flags: DIFlagPrototyped, isOptimized: true, unit: !0, retainedNodes: !9)
72 !7 = !DISubroutineType(types: !8)
74 !9 = !{!10, !25, !27, !28, !29, !38}
75 !10 = !DILocalVariable(name: "_text", scope: !6, file: !1, line: 19, type: !11)
76 !11 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !12, size: 64, align: 64)
77 !12 = distinct !DICompositeType(tag: DW_TAG_class_type, name: "A", file: !1, line: 1, size: 8, align: 8, elements: !13, identifier: "_ZTS1A")
78 !13 = !{!14, !21, !22}
79 !14 = !DISubprogram(name: "A", scope: !12, file: !1, line: 2, type: !15, isLocal: false, isDefinition: false, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true)
80 !15 = !DISubroutineType(types: !16)
81 !16 = !{null, !17, !18}
82 !17 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !12, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
83 !18 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !19, size: 64, align: 64)
84 !19 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !20)
85 !20 = !DIBasicType(name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char)
86 !21 = !DISubprogram(name: "operator+=", linkageName: "_ZN1ApLEPKc", scope: !12, file: !1, line: 5, type: !15, isLocal: false, isDefinition: false, scopeLine: 5, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: true)
87 !22 = !DISubprogram(name: "m_fn1", linkageName: "_ZN1A5m_fn1ES_", scope: !12, file: !1, line: 6, type: !23, isLocal: false, isDefinition: false, scopeLine: 6, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: true)
88 !23 = !DISubroutineType(types: !24)
89 !24 = !{null, !17, !12}
90 !25 = !DILocalVariable(name: "opts", scope: !6, file: !1, line: 20, type: !26)
91 !26 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
92 !27 = !DILocalVariable(name: "indent", scope: !6, file: !1, line: 20, type: !26)
93 !28 = !DILocalVariable(name: "type", scope: !6, file: !1, line: 20, type: !26)
94 !29 = !DILocalVariable(name: "v", scope: !6, file: !1, line: 21, type: !30)
95 !30 = distinct !DICompositeType(tag: DW_TAG_class_type, name: "B", file: !1, line: 9, size: 8, align: 8, elements: !31, identifier: "_ZTS1B")
97 !32 = !DISubprogram(name: "operator[]", linkageName: "_ZN1BixEj", scope: !30, file: !1, line: 11, type: !33, isLocal: false, isDefinition: false, scopeLine: 11, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: true)
98 !33 = !DISubroutineType(types: !34)
99 !34 = !{!35, !36, !37}
100 !35 = !DIBasicType(name: "double", size: 64, align: 64, encoding: DW_ATE_float)
101 !36 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !30, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
102 !37 = !DIBasicType(name: "unsigned int", size: 32, align: 32, encoding: DW_ATE_unsigned)
103 !38 = !DILocalVariable(name: "i", scope: !39, file: !1, line: 22, type: !26)
104 !39 = distinct !DILexicalBlock(scope: !6, file: !1, line: 22, column: 3)
105 !40 = !DILocation(line: 21, column: 3, scope: !6)
106 !41 = !DILocation(line: 14, column: 3, scope: !42, inlinedAt: !56)
107 !42 = distinct !DISubprogram(name: "Print<double>", linkageName: "_Z5PrintIdEvT_iiPiiP1A", scope: !1, file: !1, line: 13, type: !43, isLocal: false, isDefinition: true, scopeLine: 13, flags: DIFlagPrototyped, isOptimized: true, unit: !0, templateParams: !46, retainedNodes: !48)
108 !43 = !DISubroutineType(types: !44)
109 !44 = !{null, !35, !26, !26, !45, !26, !11}
110 !45 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !26, size: 64, align: 64)
112 !47 = !DITemplateTypeParameter(name: "T", type: !35)
113 !48 = !{!49, !50, !51, !52, !53, !54, !55}
114 !49 = !DILocalVariable(name: "p1", arg: 1, scope: !42, file: !1, line: 13, type: !35)
115 !50 = !DILocalVariable(arg: 2, scope: !42, file: !1, line: 13, type: !26)
116 !51 = !DILocalVariable(arg: 3, scope: !42, file: !1, line: 13, type: !26)
117 !52 = !DILocalVariable(arg: 4, scope: !42, file: !1, line: 13, type: !45)
118 !53 = !DILocalVariable(arg: 5, scope: !42, file: !1, line: 13, type: !26)
119 !54 = !DILocalVariable(name: "p6", arg: 6, scope: !42, file: !1, line: 13, type: !11)
120 !55 = !DILocalVariable(name: "text", scope: !42, file: !1, line: 14, type: !12)
121 !56 = distinct !DILocation(line: 23, column: 5, scope: !57)
122 !57 = !DILexicalBlockFile(scope: !58, file: !1, discriminator: 1)
123 !58 = distinct !DILexicalBlock(scope: !39, file: !1, line: 22, column: 3)
124 !59 = !DILocation(line: 0, scope: !60, inlinedAt: !64)
125 !60 = distinct !DISubprogram(name: "operator+=", linkageName: "_ZN1ApLEPKc", scope: !12, file: !1, line: 5, type: !15, isLocal: false, isDefinition: true, scopeLine: 5, flags: DIFlagPrototyped, isOptimized: true, unit: !0, declaration: !21, retainedNodes: !61)
127 !62 = !DILocalVariable(name: "this", arg: 1, scope: !60, type: !11, flags: DIFlagArtificial | DIFlagObjectPointer)
128 !63 = !DILocalVariable(name: "p1", arg: 2, scope: !60, file: !1, line: 5, type: !18)
129 !64 = distinct !DILocation(line: 15, column: 8, scope: !42, inlinedAt: !56)
130 !65 = !DILocation(line: 22, column: 8, scope: !39)
131 !66 = !DIExpression(DW_OP_deref)
132 !67 = !DILocation(line: 21, column: 5, scope: !6)
133 !68 = !DILocation(line: 23, column: 11, scope: !58)
134 !69 = !DIExpression()
135 !70 = !DILocation(line: 13, column: 36, scope: !42, inlinedAt: !56)
136 !71 = !DILocation(line: 13, column: 55, scope: !42, inlinedAt: !56)
137 !72 = !DILocation(line: 13, column: 65, scope: !42, inlinedAt: !56)
138 !73 = !DILocation(line: 15, column: 11, scope: !42, inlinedAt: !56)
139 !74 = !DILocation(line: 14, column: 5, scope: !42, inlinedAt: !56)
140 !75 = !DILocation(line: 5, column: 31, scope: !60, inlinedAt: !64)
141 !76 = !DILocation(line: 5, column: 43, scope: !60, inlinedAt: !64)
142 !77 = !DILocation(line: 5, column: 37, scope: !78, inlinedAt: !64)
143 !78 = !DILexicalBlockFile(scope: !60, file: !1, discriminator: 1)
144 !79 = !DILocation(line: 5, column: 48, scope: !60, inlinedAt: !64)
145 !80 = !DILocation(line: 16, column: 1, scope: !42, inlinedAt: !56)
146 !81 = !DILocation(line: 22, column: 3, scope: !57)
147 !82 = distinct !{!82, !83}
148 !83 = !DILocation(line: 22, column: 3, scope: !6)