Classify classes with no struct fields as trivially destructible (#7846)

This commit is contained in:
Christopher Di Bella
2026-09-28 22:39:03 +00:00
committed by GitHub
parent e530421ba1
commit b227419d8d
227 changed files with 9144 additions and 12453 deletions
@@ -54,8 +54,8 @@ void f() {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %this.addr = alloca ptr, align 8
// CHECK:STDOUT: %.addr = alloca i32, align 4
// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !40
// CHECK:STDOUT: store i32 %0, ptr %.addr, align 4, !tbaa !42
// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !36
// CHECK:STDOUT: store i32 %0, ptr %.addr, align 4, !tbaa !38
// CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8
// CHECK:STDOUT: call void @_COneArg__carbon_thunk.OneArg.Main(ptr noundef nonnull align 1 %this1, ptr noundef nonnull align 4 dereferenceable(4) %.addr)
// CHECK:STDOUT: ret void
@@ -65,7 +65,7 @@ void f() {
// CHECK:STDOUT: define linkonce_odr dso_local void @_ZN6Carbon6OneArgD2Ev(ptr noundef nonnull align 1 %this) unnamed_addr #3 comdat align 2 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %this.addr = alloca ptr, align 8
// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !40
// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !36
// CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8
// CHECK:STDOUT: call void @"_C__destroy_thunk:thunk.OneArg.Main"(ptr noundef nonnull align 1 %this1)
// CHECK:STDOUT: ret void
@@ -90,24 +90,17 @@ void f() {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.7040ef4e2429d520:core.Destroy.Core"(ptr %self) #5 !dbg !23 {
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.7040ef4e2429d520:core.Destroy.Core"(ptr %self) #5 !dbg !23 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: ret void, !dbg !25
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.7040ef4e2429d520:core.Destroy.Core"(ptr %self) #5 !dbg !27 {
// CHECK:STDOUT: define void @_COneArg__carbon_thunk.OneArg.Main(ptr %_, ptr %_1) #5 !dbg !27 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: call void @"_CSubobjectDestroy.7040ef4e2429d520:core.Destroy.Core"(ptr %self), !dbg !29
// CHECK:STDOUT: ret void, !dbg !29
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define void @_COneArg__carbon_thunk.OneArg.Main(ptr %_, ptr %_1) #5 !dbg !31 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %.loc6_28.2 = load i32, ptr %_1, align 4, !dbg !34
// CHECK:STDOUT: call void @_COneArg.OneArg.Main(ptr %_, i32 %.loc6_28.2), !dbg !34
// CHECK:STDOUT: ret void, !dbg !34
// CHECK:STDOUT: %.loc6_28.2 = load i32, ptr %_1, align 4, !dbg !30
// CHECK:STDOUT: call void @_COneArg.OneArg.Main(ptr %_, i32 %.loc6_28.2), !dbg !30
// CHECK:STDOUT: ret void, !dbg !30
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
@@ -118,8 +111,8 @@ void f() {
// CHECK:STDOUT: attributes #5 = { nounwind }
// CHECK:STDOUT:
// CHECK:STDOUT: !llvm.dbg.cu = !{!6}
// CHECK:STDOUT: !llvm.module.flags = !{!43, !44, !45, !3, !4}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!47}
// CHECK:STDOUT: !llvm.module.flags = !{!39, !40, !41, !3, !4}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!43}
// CHECK:STDOUT:
// CHECK:STDOUT: !3 = !{i32 7, !"Dwarf Version", i32 5}
// CHECK:STDOUT: !4 = !{i32 2, !"Debug Info Version", i32 3}
@@ -139,29 +132,25 @@ void f() {
// CHECK:STDOUT: !20 = !DILocalVariable(arg: 1, scope: !19, type: !8)
// CHECK:STDOUT: !21 = !DILocation(line: 5, column: 1, scope: !19)
// CHECK:STDOUT: !22 = !{!20}
// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.7040ef4e2429d520:core.Destroy.Core", scope: null, file: !5, line: 5, type: !12, spFlags: DISPFlagDefinition, unit: !6, retainedNodes: !26)
// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7040ef4e2429d520:core.Destroy.Core", scope: null, file: !5, line: 5, type: !12, spFlags: DISPFlagDefinition, unit: !6, retainedNodes: !26)
// CHECK:STDOUT: !24 = !DILocalVariable(arg: 1, scope: !23, type: !8)
// CHECK:STDOUT: !25 = !DILocation(line: 5, column: 1, scope: !23)
// CHECK:STDOUT: !26 = !{!24}
// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7040ef4e2429d520:core.Destroy.Core", scope: null, file: !5, line: 5, type: !12, spFlags: DISPFlagDefinition, unit: !6, retainedNodes: !30)
// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "OneArg__carbon_thunk", linkageName: "_COneArg__carbon_thunk.OneArg.Main", scope: null, file: !5, line: 6, type: !14, spFlags: DISPFlagDefinition, unit: !6, retainedNodes: !31)
// CHECK:STDOUT: !28 = !DILocalVariable(arg: 1, scope: !27, type: !8)
// CHECK:STDOUT: !29 = !DILocation(line: 5, column: 1, scope: !27)
// CHECK:STDOUT: !30 = !{!28}
// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "OneArg__carbon_thunk", linkageName: "_COneArg__carbon_thunk.OneArg.Main", scope: null, file: !5, line: 6, type: !14, spFlags: DISPFlagDefinition, unit: !6, retainedNodes: !35)
// CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !31, type: !8)
// CHECK:STDOUT: !33 = !DILocalVariable(arg: 2, scope: !31, type: !7)
// CHECK:STDOUT: !34 = !DILocation(line: 6, column: 3, scope: !31)
// CHECK:STDOUT: !35 = !{!32, !33}
// CHECK:STDOUT: !36 = !{!"Simple C++ TBAA"}
// CHECK:STDOUT: !37 = !{!"omnipotent char", !36, i64 0}
// CHECK:STDOUT: !38 = !{!"any pointer", !37, i64 0}
// CHECK:STDOUT: !39 = !{!"p1 _ZTSN6Carbon6OneArgE", !38, i64 0}
// CHECK:STDOUT: !40 = !{!39, !39, i64 0}
// CHECK:STDOUT: !41 = !{!"int", !37, i64 0}
// CHECK:STDOUT: !42 = !{!41, !41, i64 0}
// CHECK:STDOUT: !43 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !44 = !{i32 7, !"PIE Level", i32 2}
// CHECK:STDOUT: !45 = !{i32 7, !"uwtable", i32 2}
// CHECK:STDOUT: !46 = !{!"__libc_errno", !41, i64 0}
// CHECK:STDOUT: !47 = !{!46, !41, i64 0}
// CHECK:STDOUT: !29 = !DILocalVariable(arg: 2, scope: !27, type: !7)
// CHECK:STDOUT: !30 = !DILocation(line: 6, column: 3, scope: !27)
// CHECK:STDOUT: !31 = !{!28, !29}
// CHECK:STDOUT: !32 = !{!"Simple C++ TBAA"}
// CHECK:STDOUT: !33 = !{!"omnipotent char", !32, i64 0}
// CHECK:STDOUT: !34 = !{!"any pointer", !33, i64 0}
// CHECK:STDOUT: !35 = !{!"p1 _ZTSN6Carbon6OneArgE", !34, i64 0}
// CHECK:STDOUT: !36 = !{!35, !35, i64 0}
// CHECK:STDOUT: !37 = !{!"int", !33, i64 0}
// CHECK:STDOUT: !38 = !{!37, !37, i64 0}
// CHECK:STDOUT: !39 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !40 = !{i32 7, !"PIE Level", i32 2}
// CHECK:STDOUT: !41 = !{i32 7, !"uwtable", i32 2}
// CHECK:STDOUT: !42 = !{!"__libc_errno", !37, i64 0}
// CHECK:STDOUT: !43 = !{!42, !37, i64 0}
// CHECK:STDOUT:
@@ -142,7 +142,7 @@ fn Run() {
// CHECK:STDOUT: define linkonce_odr dso_local void @_ZN6Carbon1AD2Ev(ptr noundef nonnull align 1 %this) unnamed_addr #3 comdat align 2 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %this.addr = alloca ptr, align 8
// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !83
// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !75
// CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8
// CHECK:STDOUT: call void @"_C__destroy_thunk:thunk.A.Main"(ptr noundef nonnull align 1 %this1)
// CHECK:STDOUT: ret void
@@ -160,7 +160,7 @@ fn Run() {
// CHECK:STDOUT: define linkonce_odr dso_local void @_ZN6Carbon1BD2Ev(ptr noundef nonnull align 1 %this) unnamed_addr #3 comdat align 2 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %this.addr = alloca ptr, align 8
// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !85
// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !77
// CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8
// CHECK:STDOUT: call void @"_C__destroy_thunk:thunk.B.Main"(ptr noundef nonnull align 1 %this1)
// CHECK:STDOUT: ret void
@@ -195,71 +195,57 @@ fn Run() {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.5a23cc09585c55d2:core.Destroy.Core"(ptr %self) #4 !dbg !36 {
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.5a23cc09585c55d2:core.Destroy.Core"(ptr %self) #4 !dbg !36 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: ret void, !dbg !38
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.5a23cc09585c55d2:core.Destroy.Core"(ptr %self) #4 !dbg !40 {
// CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind
// CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.B.Main"(ptr %self) #5 !dbg !40 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: call void @"_CSubobjectDestroy.5a23cc09585c55d2:core.Destroy.Core"(ptr %self), !dbg !42
// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self), !dbg !42
// CHECK:STDOUT: ret void, !dbg !42
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind
// CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.B.Main"(ptr %self) #5 !dbg !44 {
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #4 !dbg !44 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self), !dbg !46
// CHECK:STDOUT: ret void, !dbg !46
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #4 !dbg !48 {
// CHECK:STDOUT: define void @_CF__carbon_thunk.26f2099a79512a5d.Main(ptr %_) #4 !dbg !48 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: call void @_CF.Main.6662a1ffb773360a(ptr %_), !dbg !50
// CHECK:STDOUT: ret void, !dbg !50
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #4 !dbg !52 {
// CHECK:STDOUT: define void @_CF__carbon_thunk.7a3b9f04ddf4269e.Main(ptr %_) #4 !dbg !52 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: call void @"_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self), !dbg !54
// CHECK:STDOUT: call void @_CF.Main.d53b17eed3ce903c(ptr %_), !dbg !54
// CHECK:STDOUT: ret void, !dbg !54
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define void @_CF__carbon_thunk.26f2099a79512a5d.Main(ptr %_) #4 !dbg !56 {
// CHECK:STDOUT: define i32 @main() #4 !dbg !56 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: call void @_CF.Main.6662a1ffb773360a(ptr %_), !dbg !58
// CHECK:STDOUT: ret void, !dbg !58
// CHECK:STDOUT: call void @_Z1Gv(), !dbg !57
// CHECK:STDOUT: ret i32 0, !dbg !58
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define void @_CF__carbon_thunk.7a3b9f04ddf4269e.Main(ptr %_) #4 !dbg !60 {
// CHECK:STDOUT: define linkonce_odr void @_CF.Main.6662a1ffb773360a(ptr %t) #4 !dbg !59 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: call void @_CF.Main.d53b17eed3ce903c(ptr %_), !dbg !62
// CHECK:STDOUT: ret void, !dbg !62
// CHECK:STDOUT: call void @"_CDoit.A.Main:I.Main"(ptr %t), !dbg !62
// CHECK:STDOUT: ret void, !dbg !63
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define i32 @main() #4 !dbg !64 {
// CHECK:STDOUT: define linkonce_odr void @_CF.Main.d53b17eed3ce903c(ptr %t) #4 !dbg !65 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: call void @_Z1Gv(), !dbg !65
// CHECK:STDOUT: ret i32 0, !dbg !66
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define linkonce_odr void @_CF.Main.6662a1ffb773360a(ptr %t) #4 !dbg !67 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: call void @"_CDoit.A.Main:I.Main"(ptr %t), !dbg !70
// CHECK:STDOUT: ret void, !dbg !71
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define linkonce_odr void @_CF.Main.d53b17eed3ce903c(ptr %t) #4 !dbg !73 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: call void @"_CDoit.B.Main:I.Main"(ptr %t), !dbg !76
// CHECK:STDOUT: ret void, !dbg !77
// CHECK:STDOUT: call void @"_CDoit.B.Main:I.Main"(ptr %t), !dbg !68
// CHECK:STDOUT: ret void, !dbg !69
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; uselistorder directives
@@ -276,8 +262,8 @@ fn Run() {
// CHECK:STDOUT: attributes #5 = { alwaysinline nounwind }
// CHECK:STDOUT:
// CHECK:STDOUT: !llvm.dbg.cu = !{!9}
// CHECK:STDOUT: !llvm.module.flags = !{!86, !87, !88, !4, !5}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!91}
// CHECK:STDOUT: !llvm.module.flags = !{!78, !79, !80, !4, !5}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!83}
// CHECK:STDOUT:
// CHECK:STDOUT: !4 = !{i32 7, !"Dwarf Version", i32 5}
// CHECK:STDOUT: !5 = !{i32 2, !"Debug Info Version", i32 3}
@@ -305,58 +291,50 @@ fn Run() {
// CHECK:STDOUT: !33 = !DILocalVariable(arg: 1, scope: !32, type: !10)
// CHECK:STDOUT: !34 = !DILocation(line: 8, column: 1, scope: !32)
// CHECK:STDOUT: !35 = !{!33}
// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.5a23cc09585c55d2:core.Destroy.Core", scope: null, file: !8, line: 8, type: !12, spFlags: DISPFlagDefinition, unit: !9, retainedNodes: !39)
// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.5a23cc09585c55d2:core.Destroy.Core", scope: null, file: !8, line: 8, type: !12, spFlags: DISPFlagDefinition, unit: !9, retainedNodes: !39)
// CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !36, type: !10)
// CHECK:STDOUT: !38 = !DILocation(line: 8, column: 1, scope: !36)
// CHECK:STDOUT: !39 = !{!37}
// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.5a23cc09585c55d2:core.Destroy.Core", scope: null, file: !8, line: 8, type: !12, spFlags: DISPFlagDefinition, unit: !9, retainedNodes: !43)
// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.B.Main", scope: null, file: !8, line: 13, type: !12, spFlags: DISPFlagDefinition, unit: !9, retainedNodes: !43)
// CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !10)
// CHECK:STDOUT: !42 = !DILocation(line: 8, column: 1, scope: !40)
// CHECK:STDOUT: !42 = !DILocation(line: 13, column: 1, scope: !40)
// CHECK:STDOUT: !43 = !{!41}
// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.B.Main", scope: null, file: !8, line: 13, type: !12, spFlags: DISPFlagDefinition, unit: !9, retainedNodes: !47)
// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !8, line: 13, type: !12, spFlags: DISPFlagDefinition, unit: !9, retainedNodes: !47)
// CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !44, type: !10)
// CHECK:STDOUT: !46 = !DILocation(line: 13, column: 1, scope: !44)
// CHECK:STDOUT: !47 = !{!45}
// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !8, line: 13, type: !12, spFlags: DISPFlagDefinition, unit: !9, retainedNodes: !51)
// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "F__carbon_thunk.26f2099a79512a5d", linkageName: "_CF__carbon_thunk.26f2099a79512a5d.Main", scope: null, file: !8, line: 19, type: !12, spFlags: DISPFlagDefinition, unit: !9, retainedNodes: !51)
// CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !10)
// CHECK:STDOUT: !50 = !DILocation(line: 13, column: 1, scope: !48)
// CHECK:STDOUT: !50 = !DILocation(line: 19, column: 1, scope: !48)
// CHECK:STDOUT: !51 = !{!49}
// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !8, line: 13, type: !12, spFlags: DISPFlagDefinition, unit: !9, retainedNodes: !55)
// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "F__carbon_thunk.7a3b9f04ddf4269e", linkageName: "_CF__carbon_thunk.7a3b9f04ddf4269e.Main", scope: null, file: !8, line: 19, type: !12, spFlags: DISPFlagDefinition, unit: !9, retainedNodes: !55)
// CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !10)
// CHECK:STDOUT: !54 = !DILocation(line: 13, column: 1, scope: !52)
// CHECK:STDOUT: !54 = !DILocation(line: 19, column: 1, scope: !52)
// CHECK:STDOUT: !55 = !{!53}
// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "F__carbon_thunk.26f2099a79512a5d", linkageName: "_CF__carbon_thunk.26f2099a79512a5d.Main", scope: null, file: !8, line: 19, type: !12, spFlags: DISPFlagDefinition, unit: !9, retainedNodes: !59)
// CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !56, type: !10)
// CHECK:STDOUT: !58 = !DILocation(line: 19, column: 1, scope: !56)
// CHECK:STDOUT: !59 = !{!57}
// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "F__carbon_thunk.7a3b9f04ddf4269e", linkageName: "_CF__carbon_thunk.7a3b9f04ddf4269e.Main", scope: null, file: !8, line: 19, type: !12, spFlags: DISPFlagDefinition, unit: !9, retainedNodes: !63)
// CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !10)
// CHECK:STDOUT: !62 = !DILocation(line: 19, column: 1, scope: !60)
// CHECK:STDOUT: !63 = !{!61}
// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !8, line: 32, type: !15, spFlags: DISPFlagDefinition, unit: !9)
// CHECK:STDOUT: !65 = !DILocation(line: 33, column: 3, scope: !64)
// CHECK:STDOUT: !66 = !DILocation(line: 32, column: 1, scope: !64)
// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.6662a1ffb773360a", scope: null, file: !8, line: 19, type: !12, spFlags: DISPFlagDefinition, unit: !9, retainedNodes: !72)
// CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !67, type: !10)
// CHECK:STDOUT: !70 = !DILocation(line: 20, column: 3, scope: !67)
// CHECK:STDOUT: !71 = !DILocation(line: 19, column: 1, scope: !67)
// CHECK:STDOUT: !72 = !{!68}
// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.d53b17eed3ce903c", scope: null, file: !8, line: 19, type: !12, spFlags: DISPFlagDefinition, unit: !9, retainedNodes: !78)
// CHECK:STDOUT: !74 = !DILocalVariable(arg: 1, scope: !73, type: !10)
// CHECK:STDOUT: !76 = !DILocation(line: 20, column: 3, scope: !73)
// CHECK:STDOUT: !77 = !DILocation(line: 19, column: 1, scope: !73)
// CHECK:STDOUT: !78 = !{!74}
// CHECK:STDOUT: !79 = !{!"Simple C++ TBAA"}
// CHECK:STDOUT: !80 = !{!"omnipotent char", !79, i64 0}
// CHECK:STDOUT: !81 = !{!"any pointer", !80, i64 0}
// CHECK:STDOUT: !82 = !{!"p1 _ZTSN6Carbon1AE", !81, i64 0}
// CHECK:STDOUT: !83 = !{!82, !82, i64 0}
// CHECK:STDOUT: !84 = !{!"p1 _ZTSN6Carbon1BE", !81, i64 0}
// CHECK:STDOUT: !85 = !{!84, !84, i64 0}
// CHECK:STDOUT: !86 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !87 = !{i32 7, !"PIE Level", i32 2}
// CHECK:STDOUT: !88 = !{i32 7, !"uwtable", i32 2}
// CHECK:STDOUT: !89 = !{!"int", !80, i64 0}
// CHECK:STDOUT: !90 = !{!"__libc_errno", !89, i64 0}
// CHECK:STDOUT: !91 = !{!90, !89, i64 0}
// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !8, line: 32, type: !15, spFlags: DISPFlagDefinition, unit: !9)
// CHECK:STDOUT: !57 = !DILocation(line: 33, column: 3, scope: !56)
// CHECK:STDOUT: !58 = !DILocation(line: 32, column: 1, scope: !56)
// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.6662a1ffb773360a", scope: null, file: !8, line: 19, type: !12, spFlags: DISPFlagDefinition, unit: !9, retainedNodes: !64)
// CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !59, type: !10)
// CHECK:STDOUT: !62 = !DILocation(line: 20, column: 3, scope: !59)
// CHECK:STDOUT: !63 = !DILocation(line: 19, column: 1, scope: !59)
// CHECK:STDOUT: !64 = !{!60}
// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.d53b17eed3ce903c", scope: null, file: !8, line: 19, type: !12, spFlags: DISPFlagDefinition, unit: !9, retainedNodes: !70)
// CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !65, type: !10)
// CHECK:STDOUT: !68 = !DILocation(line: 20, column: 3, scope: !65)
// CHECK:STDOUT: !69 = !DILocation(line: 19, column: 1, scope: !65)
// CHECK:STDOUT: !70 = !{!66}
// CHECK:STDOUT: !71 = !{!"Simple C++ TBAA"}
// CHECK:STDOUT: !72 = !{!"omnipotent char", !71, i64 0}
// CHECK:STDOUT: !73 = !{!"any pointer", !72, i64 0}
// CHECK:STDOUT: !74 = !{!"p1 _ZTSN6Carbon1AE", !73, i64 0}
// CHECK:STDOUT: !75 = !{!74, !74, i64 0}
// CHECK:STDOUT: !76 = !{!"p1 _ZTSN6Carbon1BE", !73, i64 0}
// CHECK:STDOUT: !77 = !{!76, !76, i64 0}
// CHECK:STDOUT: !78 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !79 = !{i32 7, !"PIE Level", i32 2}
// CHECK:STDOUT: !80 = !{i32 7, !"uwtable", i32 2}
// CHECK:STDOUT: !81 = !{!"int", !72, i64 0}
// CHECK:STDOUT: !82 = !{!"__libc_errno", !81, i64 0}
// CHECK:STDOUT: !83 = !{!82, !81, i64 0}
// CHECK:STDOUT:
@@ -427,8 +427,8 @@ fn MyF() -> i32 {
// CHECK:STDOUT: define internal void @_Z13NoReturnValueii.carbon_thunk._(i32 noundef %a) #1 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %a.addr = alloca i32, align 4
// CHECK:STDOUT: store i32 %a, ptr %a.addr, align 4, !tbaa !95
// CHECK:STDOUT: %0 = load i32, ptr %a.addr, align 4, !tbaa !95
// CHECK:STDOUT: store i32 %a, ptr %a.addr, align 4, !tbaa !91
// CHECK:STDOUT: %0 = load i32, ptr %a.addr, align 4, !tbaa !91
// CHECK:STDOUT: call void @_Z13NoReturnValueii(i32 noundef %0, i32 noundef 2)
// CHECK:STDOUT: ret void
// CHECK:STDOUT: }
@@ -446,8 +446,8 @@ fn MyF() -> i32 {
// CHECK:STDOUT: define internal noundef i32 @_Z17SimpleReturnValueii.carbon_thunk._(i32 noundef %a) #1 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %a.addr = alloca i32, align 4
// CHECK:STDOUT: store i32 %a, ptr %a.addr, align 4, !tbaa !95
// CHECK:STDOUT: %0 = load i32, ptr %a.addr, align 4, !tbaa !95
// CHECK:STDOUT: store i32 %a, ptr %a.addr, align 4, !tbaa !91
// CHECK:STDOUT: %0 = load i32, ptr %a.addr, align 4, !tbaa !91
// CHECK:STDOUT: %call = call noundef i32 @_Z17SimpleReturnValueii(i32 noundef %0, i32 noundef 2)
// CHECK:STDOUT: ret i32 %call
// CHECK:STDOUT: }
@@ -461,18 +461,11 @@ fn MyF() -> i32 {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !87 {
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !87 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: ret void, !dbg !89
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !91 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !93
// CHECK:STDOUT: ret void, !dbg !93
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
// CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #3
// CHECK:STDOUT:
@@ -522,13 +515,9 @@ fn MyF() -> i32 {
// CHECK:STDOUT: !84 = !DILocalVariable(arg: 1, scope: !83, type: !57)
// CHECK:STDOUT: !85 = !DILocation(line: 11, column: 3, scope: !83)
// CHECK:STDOUT: !86 = !{!84}
// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !55, line: 11, type: !61, spFlags: DISPFlagDefinition, unit: !56, retainedNodes: !90)
// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !55, line: 11, type: !61, spFlags: DISPFlagDefinition, unit: !56, retainedNodes: !90)
// CHECK:STDOUT: !88 = !DILocalVariable(arg: 1, scope: !87, type: !57)
// CHECK:STDOUT: !89 = !DILocation(line: 11, column: 3, scope: !87)
// CHECK:STDOUT: !90 = !{!88}
// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !55, line: 11, type: !61, spFlags: DISPFlagDefinition, unit: !56, retainedNodes: !94)
// CHECK:STDOUT: !92 = !DILocalVariable(arg: 1, scope: !91, type: !57)
// CHECK:STDOUT: !93 = !DILocation(line: 11, column: 3, scope: !91)
// CHECK:STDOUT: !94 = !{!92}
// CHECK:STDOUT: !95 = !{!30, !30, i64 0}
// CHECK:STDOUT: !91 = !{!30, !30, i64 0}
// CHECK:STDOUT:
@@ -59,18 +59,11 @@ fn Call() -> i32 {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #1 !dbg !49 {
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #1 !dbg !49 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: ret void, !dbg !51
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #1 !dbg !53 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !55
// CHECK:STDOUT: ret void, !dbg !55
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
// CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #2
// CHECK:STDOUT:
@@ -79,8 +72,8 @@ fn Call() -> i32 {
// CHECK:STDOUT: attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
// CHECK:STDOUT:
// CHECK:STDOUT: !llvm.dbg.cu = !{!26}
// CHECK:STDOUT: !llvm.module.flags = !{!57, !58, !59, !9, !10}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!61}
// CHECK:STDOUT: !llvm.module.flags = !{!53, !54, !55, !9, !10}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!57}
// CHECK:STDOUT:
// CHECK:STDOUT: !0 = !{!"Simple C++ TBAA"}
// CHECK:STDOUT: !1 = !{!"omnipotent char", !0, i64 0}
@@ -107,17 +100,13 @@ fn Call() -> i32 {
// CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !27)
// CHECK:STDOUT: !47 = !DILocation(line: 22, column: 3, scope: !45)
// CHECK:STDOUT: !48 = !{!46}
// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !25, line: 22, type: !34, spFlags: DISPFlagDefinition, unit: !26, retainedNodes: !52)
// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !25, line: 22, type: !34, spFlags: DISPFlagDefinition, unit: !26, retainedNodes: !52)
// CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !49, type: !27)
// CHECK:STDOUT: !51 = !DILocation(line: 22, column: 3, scope: !49)
// CHECK:STDOUT: !52 = !{!50}
// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !25, line: 22, type: !34, spFlags: DISPFlagDefinition, unit: !26, retainedNodes: !56)
// CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !27)
// CHECK:STDOUT: !55 = !DILocation(line: 22, column: 3, scope: !53)
// CHECK:STDOUT: !56 = !{!54}
// CHECK:STDOUT: !57 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !58 = !{i32 7, !"PIE Level", i32 2}
// CHECK:STDOUT: !59 = !{i32 7, !"uwtable", i32 2}
// CHECK:STDOUT: !60 = !{!"__libc_errno", !2, i64 0}
// CHECK:STDOUT: !61 = !{!60, !2, i64 0}
// CHECK:STDOUT: !53 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !54 = !{i32 7, !"PIE Level", i32 2}
// CHECK:STDOUT: !55 = !{i32 7, !"uwtable", i32 2}
// CHECK:STDOUT: !56 = !{!"__libc_errno", !2, i64 0}
// CHECK:STDOUT: !57 = !{!56, !2, i64 0}
// CHECK:STDOUT:
@@ -148,16 +148,16 @@ fn PassValueExpr(y: Cpp.Y) {
// CHECK:STDOUT: %.addr1 = alloca ptr, align 8
// CHECK:STDOUT: %.addr2 = alloca i32, align 4
// CHECK:STDOUT: %.addr3 = alloca i64, align 8
// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !140
// CHECK:STDOUT: store ptr %1, ptr %.addr1, align 8, !tbaa !143
// CHECK:STDOUT: store i32 %2, ptr %.addr2, align 4, !tbaa !145
// CHECK:STDOUT: store i64 %3, ptr %.addr3, align 8, !tbaa !147
// CHECK:STDOUT: %4 = load ptr, ptr %.addr, align 8, !tbaa !140
// CHECK:STDOUT: %5 = load i8, ptr %4, align 1, !tbaa !148
// CHECK:STDOUT: %6 = load ptr, ptr %.addr1, align 8, !tbaa !143
// CHECK:STDOUT: %7 = load i16, ptr %6, align 2, !tbaa !149
// CHECK:STDOUT: %8 = load i32, ptr %.addr2, align 4, !tbaa !145
// CHECK:STDOUT: %9 = load i64, ptr %.addr3, align 8, !tbaa !147
// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !124
// CHECK:STDOUT: store ptr %1, ptr %.addr1, align 8, !tbaa !127
// CHECK:STDOUT: store i32 %2, ptr %.addr2, align 4, !tbaa !129
// CHECK:STDOUT: store i64 %3, ptr %.addr3, align 8, !tbaa !131
// CHECK:STDOUT: %4 = load ptr, ptr %.addr, align 8, !tbaa !124
// CHECK:STDOUT: %5 = load i8, ptr %4, align 1, !tbaa !132
// CHECK:STDOUT: %6 = load ptr, ptr %.addr1, align 8, !tbaa !127
// CHECK:STDOUT: %7 = load i16, ptr %6, align 2, !tbaa !133
// CHECK:STDOUT: %8 = load i32, ptr %.addr2, align 4, !tbaa !129
// CHECK:STDOUT: %9 = load i64, ptr %.addr3, align 8, !tbaa !131
// CHECK:STDOUT: call void @_Z11pass_signedasil(i8 noundef signext %5, i16 noundef signext %7, i32 noundef %8, i64 noundef %9)
// CHECK:STDOUT: ret void
// CHECK:STDOUT: }
@@ -169,37 +169,23 @@ fn PassValueExpr(y: Cpp.Y) {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.d57cb32fcf12ec07:core.Destroy.Core"(ptr %self) #0 !dbg !73 {
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %self) #0 !dbg !73 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: ret void, !dbg !75
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %self) #0 !dbg !77 {
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c4a4fcc00062c7f0:core.Destroy.Core"(ptr %self) #0 !dbg !77 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: call void @"_CSubobjectDestroy.d57cb32fcf12ec07:core.Destroy.Core"(ptr %self), !dbg !79
// CHECK:STDOUT: ret void, !dbg !79
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c4a4fcc00062c7f0:core.Destroy.Core"(ptr %self) #0 !dbg !81 {
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.4954785a8b134801:core.Destroy.Core"(ptr %self) #0 !dbg !81 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: ret void, !dbg !83
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.4954785a8b134801:core.Destroy.Core"(ptr %self) #0 !dbg !85 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: ret void, !dbg !87
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.4954785a8b134801:core.Destroy.Core"(ptr %self) #0 !dbg !89 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: call void @"_CSubobjectDestroy.4954785a8b134801:core.Destroy.Core"(ptr %self), !dbg !91
// CHECK:STDOUT: ret void, !dbg !91
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable
// CHECK:STDOUT: define internal void @_Z13pass_unsignedhtjm.carbon_thunk.____(ptr noundef %0, ptr noundef %1, i32 noundef %2, i64 noundef %3) #1 {
// CHECK:STDOUT: entry:
@@ -207,96 +193,82 @@ fn PassValueExpr(y: Cpp.Y) {
// CHECK:STDOUT: %.addr1 = alloca ptr, align 8
// CHECK:STDOUT: %.addr2 = alloca i32, align 4
// CHECK:STDOUT: %.addr3 = alloca i64, align 8
// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !140
// CHECK:STDOUT: store ptr %1, ptr %.addr1, align 8, !tbaa !143
// CHECK:STDOUT: store i32 %2, ptr %.addr2, align 4, !tbaa !145
// CHECK:STDOUT: store i64 %3, ptr %.addr3, align 8, !tbaa !147
// CHECK:STDOUT: %4 = load ptr, ptr %.addr, align 8, !tbaa !140
// CHECK:STDOUT: %5 = load i8, ptr %4, align 1, !tbaa !148
// CHECK:STDOUT: %6 = load ptr, ptr %.addr1, align 8, !tbaa !143
// CHECK:STDOUT: %7 = load i16, ptr %6, align 2, !tbaa !149
// CHECK:STDOUT: %8 = load i32, ptr %.addr2, align 4, !tbaa !145
// CHECK:STDOUT: %9 = load i64, ptr %.addr3, align 8, !tbaa !147
// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !124
// CHECK:STDOUT: store ptr %1, ptr %.addr1, align 8, !tbaa !127
// CHECK:STDOUT: store i32 %2, ptr %.addr2, align 4, !tbaa !129
// CHECK:STDOUT: store i64 %3, ptr %.addr3, align 8, !tbaa !131
// CHECK:STDOUT: %4 = load ptr, ptr %.addr, align 8, !tbaa !124
// CHECK:STDOUT: %5 = load i8, ptr %4, align 1, !tbaa !132
// CHECK:STDOUT: %6 = load ptr, ptr %.addr1, align 8, !tbaa !127
// CHECK:STDOUT: %7 = load i16, ptr %6, align 2, !tbaa !133
// CHECK:STDOUT: %8 = load i32, ptr %.addr2, align 4, !tbaa !129
// CHECK:STDOUT: %9 = load i64, ptr %.addr3, align 8, !tbaa !131
// CHECK:STDOUT: call void @_Z13pass_unsignedhtjm(i8 noundef zeroext %5, i16 noundef zeroext %7, i32 noundef %8, i64 noundef %9)
// CHECK:STDOUT: ret void
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.99892fadd247b492:core.Destroy.Core"(ptr %self) #0 !dbg !93 {
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.99892fadd247b492:core.Destroy.Core"(ptr %self) #0 !dbg !85 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: ret void, !dbg !87
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3bc9e5dacf328f74:core.Destroy.Core"(ptr %self) #0 !dbg !89 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: ret void, !dbg !91
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.04514f1c5a56b0cb:core.Destroy.Core"(ptr %self) #0 !dbg !93 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: ret void, !dbg !95
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.3bc9e5dacf328f74:core.Destroy.Core"(ptr %self) #0 !dbg !97 {
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.be60742f00557eec:core.Destroy.Core"(ptr %self) #0 !dbg !97 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: ret void, !dbg !99
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3bc9e5dacf328f74:core.Destroy.Core"(ptr %self) #0 !dbg !101 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: call void @"_CSubobjectDestroy.3bc9e5dacf328f74:core.Destroy.Core"(ptr %self), !dbg !103
// CHECK:STDOUT: ret void, !dbg !103
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.04514f1c5a56b0cb:core.Destroy.Core"(ptr %self) #0 !dbg !105 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: ret void, !dbg !107
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.be60742f00557eec:core.Destroy.Core"(ptr %self) #0 !dbg !109 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: ret void, !dbg !111
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.be60742f00557eec:core.Destroy.Core"(ptr %self) #0 !dbg !113 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: call void @"_CSubobjectDestroy.be60742f00557eec:core.Destroy.Core"(ptr %self), !dbg !115
// CHECK:STDOUT: ret void, !dbg !115
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: declare i16 @_CMakeShort.Main()
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define void @_CPassShort.Main(i16 %a, ptr %b) #0 !dbg !117 {
// CHECK:STDOUT: define void @_CPassShort.Main(i16 %a, ptr %b) #0 !dbg !101 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %.loc17_18.1.temp = alloca i16, align 2, !dbg !122
// CHECK:STDOUT: %.loc18_18.3.temp = alloca i16, align 2, !dbg !125
// CHECK:STDOUT: %.loc19_18.2.temp = alloca i16, align 2, !dbg !127
// CHECK:STDOUT: %.loc20_28.3.temp = alloca i16, align 2, !dbg !129
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc17_18.1.temp), !dbg !122
// CHECK:STDOUT: store i16 %a, ptr %.loc17_18.1.temp, align 2, !dbg !122
// CHECK:STDOUT: call void @_Z10pass_shorts.carbon_thunk._(ptr %.loc17_18.1.temp), !dbg !123
// CHECK:STDOUT: call void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %.loc17_18.1.temp), !dbg !122
// CHECK:STDOUT: %.loc18_18.2 = load i16, ptr %b, align 2, !dbg !125
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_18.3.temp), !dbg !125
// CHECK:STDOUT: store i16 %.loc18_18.2, ptr %.loc18_18.3.temp, align 2, !dbg !125
// CHECK:STDOUT: call void @_Z10pass_shorts.carbon_thunk._(ptr %.loc18_18.3.temp), !dbg !126
// CHECK:STDOUT: call void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %.loc18_18.3.temp), !dbg !125
// CHECK:STDOUT: %.loc19_18.1 = load i16, ptr @_Cc.Main, align 2, !dbg !127
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc19_18.2.temp), !dbg !127
// CHECK:STDOUT: store i16 %.loc19_18.1, ptr %.loc19_18.2.temp, align 2, !dbg !127
// CHECK:STDOUT: call void @_Z10pass_shorts.carbon_thunk._(ptr %.loc19_18.2.temp), !dbg !128
// CHECK:STDOUT: call void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %.loc19_18.2.temp), !dbg !127
// CHECK:STDOUT: %MakeShort.call = call i16 @_CMakeShort.Main(), !dbg !129
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc20_28.3.temp), !dbg !129
// CHECK:STDOUT: store i16 %MakeShort.call, ptr %.loc20_28.3.temp, align 2, !dbg !129
// CHECK:STDOUT: call void @_Z10pass_shorts.carbon_thunk._(ptr %.loc20_28.3.temp), !dbg !130
// CHECK:STDOUT: call void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %.loc20_28.3.temp), !dbg !129
// CHECK:STDOUT: ret void, !dbg !131
// CHECK:STDOUT: %.loc17_18.1.temp = alloca i16, align 2, !dbg !106
// CHECK:STDOUT: %.loc18_18.3.temp = alloca i16, align 2, !dbg !109
// CHECK:STDOUT: %.loc19_18.2.temp = alloca i16, align 2, !dbg !111
// CHECK:STDOUT: %.loc20_28.3.temp = alloca i16, align 2, !dbg !113
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc17_18.1.temp), !dbg !106
// CHECK:STDOUT: store i16 %a, ptr %.loc17_18.1.temp, align 2, !dbg !106
// CHECK:STDOUT: call void @_Z10pass_shorts.carbon_thunk._(ptr %.loc17_18.1.temp), !dbg !107
// CHECK:STDOUT: call void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %.loc17_18.1.temp), !dbg !106
// CHECK:STDOUT: %.loc18_18.2 = load i16, ptr %b, align 2, !dbg !109
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_18.3.temp), !dbg !109
// CHECK:STDOUT: store i16 %.loc18_18.2, ptr %.loc18_18.3.temp, align 2, !dbg !109
// CHECK:STDOUT: call void @_Z10pass_shorts.carbon_thunk._(ptr %.loc18_18.3.temp), !dbg !110
// CHECK:STDOUT: call void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %.loc18_18.3.temp), !dbg !109
// CHECK:STDOUT: %.loc19_18.1 = load i16, ptr @_Cc.Main, align 2, !dbg !111
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc19_18.2.temp), !dbg !111
// CHECK:STDOUT: store i16 %.loc19_18.1, ptr %.loc19_18.2.temp, align 2, !dbg !111
// CHECK:STDOUT: call void @_Z10pass_shorts.carbon_thunk._(ptr %.loc19_18.2.temp), !dbg !112
// CHECK:STDOUT: call void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %.loc19_18.2.temp), !dbg !111
// CHECK:STDOUT: %MakeShort.call = call i16 @_CMakeShort.Main(), !dbg !113
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc20_28.3.temp), !dbg !113
// CHECK:STDOUT: store i16 %MakeShort.call, ptr %.loc20_28.3.temp, align 2, !dbg !113
// CHECK:STDOUT: call void @_Z10pass_shorts.carbon_thunk._(ptr %.loc20_28.3.temp), !dbg !114
// CHECK:STDOUT: call void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %.loc20_28.3.temp), !dbg !113
// CHECK:STDOUT: ret void, !dbg !115
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable
// CHECK:STDOUT: define internal void @_Z10pass_shorts.carbon_thunk._(ptr noundef %0) #1 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %.addr = alloca ptr, align 8
// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !143
// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !143
// CHECK:STDOUT: %2 = load i16, ptr %1, align 2, !tbaa !149
// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !127
// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !127
// CHECK:STDOUT: %2 = load i16, ptr %1, align 2, !tbaa !133
// CHECK:STDOUT: call void @_Z10pass_shorts(i16 noundef signext %2)
// CHECK:STDOUT: ret void
// CHECK:STDOUT: }
@@ -305,10 +277,10 @@ fn PassValueExpr(y: Cpp.Y) {
// CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #2
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define internal void @_C__global_init.Main() #0 !dbg !133 {
// CHECK:STDOUT: define internal void @_C__global_init.Main() #0 !dbg !117 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: store i16 poison, ptr @_Cc.Main, align 2, !dbg !134
// CHECK:STDOUT: ret void, !dbg !135
// CHECK:STDOUT: store i16 poison, ptr @_Cc.Main, align 2, !dbg !118
// CHECK:STDOUT: ret void, !dbg !119
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: declare void @_Z11pass_signedasil(i8 noundef signext, i16 noundef signext, i32 noundef, i64 noundef) #3
@@ -327,8 +299,8 @@ fn PassValueExpr(y: Cpp.Y) {
// CHECK:STDOUT: attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
// CHECK:STDOUT:
// CHECK:STDOUT: !llvm.dbg.cu = !{!33}
// CHECK:STDOUT: !llvm.module.flags = !{!150, !151, !152, !2, !3}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!154}
// CHECK:STDOUT: !llvm.module.flags = !{!134, !135, !136, !2, !3}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!138}
// CHECK:STDOUT:
// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5}
// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3}
@@ -363,85 +335,69 @@ fn PassValueExpr(y: Cpp.Y) {
// CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !69, type: !37)
// CHECK:STDOUT: !71 = !DILocation(line: 7, column: 22, scope: !69)
// CHECK:STDOUT: !72 = !{!70}
// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d57cb32fcf12ec07:core.Destroy.Core", scope: null, file: !32, line: 7, type: !46, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !76)
// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core", scope: null, file: !32, line: 7, type: !46, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !76)
// CHECK:STDOUT: !74 = !DILocalVariable(arg: 1, scope: !73, type: !37)
// CHECK:STDOUT: !75 = !DILocation(line: 7, column: 22, scope: !73)
// CHECK:STDOUT: !76 = !{!74}
// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core", scope: null, file: !32, line: 7, type: !46, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !80)
// CHECK:STDOUT: !78 = !DILocalVariable(arg: 1, scope: !77, type: !37)
// CHECK:STDOUT: !79 = !DILocation(line: 7, column: 22, scope: !77)
// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c4a4fcc00062c7f0:core.Destroy.Core", scope: null, file: !32, line: 7, type: !48, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !80)
// CHECK:STDOUT: !78 = !DILocalVariable(arg: 1, scope: !77, type: !36)
// CHECK:STDOUT: !79 = !DILocation(line: 7, column: 19, scope: !77)
// CHECK:STDOUT: !80 = !{!78}
// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c4a4fcc00062c7f0:core.Destroy.Core", scope: null, file: !32, line: 7, type: !48, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !84)
// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.4954785a8b134801:core.Destroy.Core", scope: null, file: !32, line: 7, type: !48, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !84)
// CHECK:STDOUT: !82 = !DILocalVariable(arg: 1, scope: !81, type: !36)
// CHECK:STDOUT: !83 = !DILocation(line: 7, column: 19, scope: !81)
// CHECK:STDOUT: !84 = !{!82}
// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.4954785a8b134801:core.Destroy.Core", scope: null, file: !32, line: 7, type: !48, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !88)
// CHECK:STDOUT: !86 = !DILocalVariable(arg: 1, scope: !85, type: !36)
// CHECK:STDOUT: !87 = !DILocation(line: 7, column: 19, scope: !85)
// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.99892fadd247b492:core.Destroy.Core", scope: null, file: !32, line: 9, type: !52, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !88)
// CHECK:STDOUT: !86 = !DILocalVariable(arg: 1, scope: !85, type: !39)
// CHECK:STDOUT: !87 = !DILocation(line: 9, column: 24, scope: !85)
// CHECK:STDOUT: !88 = !{!86}
// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.4954785a8b134801:core.Destroy.Core", scope: null, file: !32, line: 7, type: !48, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !92)
// CHECK:STDOUT: !90 = !DILocalVariable(arg: 1, scope: !89, type: !36)
// CHECK:STDOUT: !91 = !DILocation(line: 7, column: 19, scope: !89)
// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3bc9e5dacf328f74:core.Destroy.Core", scope: null, file: !32, line: 9, type: !52, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !92)
// CHECK:STDOUT: !90 = !DILocalVariable(arg: 1, scope: !89, type: !39)
// CHECK:STDOUT: !91 = !DILocation(line: 9, column: 24, scope: !89)
// CHECK:STDOUT: !92 = !{!90}
// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.99892fadd247b492:core.Destroy.Core", scope: null, file: !32, line: 9, type: !52, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !96)
// CHECK:STDOUT: !94 = !DILocalVariable(arg: 1, scope: !93, type: !39)
// CHECK:STDOUT: !95 = !DILocation(line: 9, column: 24, scope: !93)
// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.04514f1c5a56b0cb:core.Destroy.Core", scope: null, file: !32, line: 9, type: !54, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !96)
// CHECK:STDOUT: !94 = !DILocalVariable(arg: 1, scope: !93, type: !8)
// CHECK:STDOUT: !95 = !DILocation(line: 9, column: 21, scope: !93)
// CHECK:STDOUT: !96 = !{!94}
// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.3bc9e5dacf328f74:core.Destroy.Core", scope: null, file: !32, line: 9, type: !52, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !100)
// CHECK:STDOUT: !98 = !DILocalVariable(arg: 1, scope: !97, type: !39)
// CHECK:STDOUT: !99 = !DILocation(line: 9, column: 24, scope: !97)
// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.be60742f00557eec:core.Destroy.Core", scope: null, file: !32, line: 9, type: !54, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !100)
// CHECK:STDOUT: !98 = !DILocalVariable(arg: 1, scope: !97, type: !8)
// CHECK:STDOUT: !99 = !DILocation(line: 9, column: 21, scope: !97)
// CHECK:STDOUT: !100 = !{!98}
// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3bc9e5dacf328f74:core.Destroy.Core", scope: null, file: !32, line: 9, type: !52, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !104)
// CHECK:STDOUT: !102 = !DILocalVariable(arg: 1, scope: !101, type: !39)
// CHECK:STDOUT: !103 = !DILocation(line: 9, column: 24, scope: !101)
// CHECK:STDOUT: !104 = !{!102}
// CHECK:STDOUT: !105 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.04514f1c5a56b0cb:core.Destroy.Core", scope: null, file: !32, line: 9, type: !54, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !108)
// CHECK:STDOUT: !106 = !DILocalVariable(arg: 1, scope: !105, type: !8)
// CHECK:STDOUT: !107 = !DILocation(line: 9, column: 21, scope: !105)
// CHECK:STDOUT: !108 = !{!106}
// CHECK:STDOUT: !109 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.be60742f00557eec:core.Destroy.Core", scope: null, file: !32, line: 9, type: !54, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !112)
// CHECK:STDOUT: !110 = !DILocalVariable(arg: 1, scope: !109, type: !8)
// CHECK:STDOUT: !111 = !DILocation(line: 9, column: 21, scope: !109)
// CHECK:STDOUT: !112 = !{!110}
// CHECK:STDOUT: !113 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.be60742f00557eec:core.Destroy.Core", scope: null, file: !32, line: 9, type: !54, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !116)
// CHECK:STDOUT: !114 = !DILocalVariable(arg: 1, scope: !113, type: !8)
// CHECK:STDOUT: !115 = !DILocation(line: 9, column: 21, scope: !113)
// CHECK:STDOUT: !116 = !{!114}
// CHECK:STDOUT: !117 = distinct !DISubprogram(name: "PassShort", linkageName: "_CPassShort.Main", scope: null, file: !32, line: 16, type: !58, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !132)
// CHECK:STDOUT: !118 = !DILocalVariable(arg: 1, scope: !117, type: !37)
// CHECK:STDOUT: !119 = !DILocalVariable(arg: 2, scope: !117, type: !42)
// CHECK:STDOUT: !122 = !DILocation(line: 17, column: 18, scope: !117)
// CHECK:STDOUT: !123 = !DILocation(line: 17, column: 3, scope: !117)
// CHECK:STDOUT: !125 = !DILocation(line: 18, column: 18, scope: !117)
// CHECK:STDOUT: !126 = !DILocation(line: 18, column: 3, scope: !117)
// CHECK:STDOUT: !127 = !DILocation(line: 19, column: 18, scope: !117)
// CHECK:STDOUT: !128 = !DILocation(line: 19, column: 3, scope: !117)
// CHECK:STDOUT: !129 = !DILocation(line: 20, column: 18, scope: !117)
// CHECK:STDOUT: !130 = !DILocation(line: 20, column: 3, scope: !117)
// CHECK:STDOUT: !131 = !DILocation(line: 16, column: 1, scope: !117)
// CHECK:STDOUT: !132 = !{!118, !119}
// CHECK:STDOUT: !133 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !32, type: !41, spFlags: DISPFlagDefinition, unit: !33)
// CHECK:STDOUT: !134 = !DILocation(line: 14, column: 1, scope: !133)
// CHECK:STDOUT: !135 = !DILocation(line: 0, scope: !133)
// CHECK:STDOUT: !136 = !{!"Simple C++ TBAA"}
// CHECK:STDOUT: !137 = !{!"omnipotent char", !136, i64 0}
// CHECK:STDOUT: !138 = !{!"any pointer", !137, i64 0}
// CHECK:STDOUT: !139 = !{!"p1 omnipotent char", !138, i64 0}
// CHECK:STDOUT: !140 = !{!139, !139, i64 0}
// CHECK:STDOUT: !141 = !{!"short", !137, i64 0}
// CHECK:STDOUT: !142 = !{!"p1 short", !138, i64 0}
// CHECK:STDOUT: !143 = !{!142, !142, i64 0}
// CHECK:STDOUT: !144 = !{!"int", !137, i64 0}
// CHECK:STDOUT: !145 = !{!144, !144, i64 0}
// CHECK:STDOUT: !146 = !{!"long", !137, i64 0}
// CHECK:STDOUT: !147 = !{!146, !146, i64 0}
// CHECK:STDOUT: !148 = !{!137, !137, i64 0}
// CHECK:STDOUT: !149 = !{!141, !141, i64 0}
// CHECK:STDOUT: !150 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !151 = !{i32 7, !"PIE Level", i32 2}
// CHECK:STDOUT: !152 = !{i32 7, !"uwtable", i32 2}
// CHECK:STDOUT: !153 = !{!"__libc_errno", !144, i64 0}
// CHECK:STDOUT: !154 = !{!153, !144, i64 0}
// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "PassShort", linkageName: "_CPassShort.Main", scope: null, file: !32, line: 16, type: !58, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !116)
// CHECK:STDOUT: !102 = !DILocalVariable(arg: 1, scope: !101, type: !37)
// CHECK:STDOUT: !103 = !DILocalVariable(arg: 2, scope: !101, type: !42)
// CHECK:STDOUT: !106 = !DILocation(line: 17, column: 18, scope: !101)
// CHECK:STDOUT: !107 = !DILocation(line: 17, column: 3, scope: !101)
// CHECK:STDOUT: !109 = !DILocation(line: 18, column: 18, scope: !101)
// CHECK:STDOUT: !110 = !DILocation(line: 18, column: 3, scope: !101)
// CHECK:STDOUT: !111 = !DILocation(line: 19, column: 18, scope: !101)
// CHECK:STDOUT: !112 = !DILocation(line: 19, column: 3, scope: !101)
// CHECK:STDOUT: !113 = !DILocation(line: 20, column: 18, scope: !101)
// CHECK:STDOUT: !114 = !DILocation(line: 20, column: 3, scope: !101)
// CHECK:STDOUT: !115 = !DILocation(line: 16, column: 1, scope: !101)
// CHECK:STDOUT: !116 = !{!102, !103}
// CHECK:STDOUT: !117 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !32, type: !41, spFlags: DISPFlagDefinition, unit: !33)
// CHECK:STDOUT: !118 = !DILocation(line: 14, column: 1, scope: !117)
// CHECK:STDOUT: !119 = !DILocation(line: 0, scope: !117)
// CHECK:STDOUT: !120 = !{!"Simple C++ TBAA"}
// CHECK:STDOUT: !121 = !{!"omnipotent char", !120, i64 0}
// CHECK:STDOUT: !122 = !{!"any pointer", !121, i64 0}
// CHECK:STDOUT: !123 = !{!"p1 omnipotent char", !122, i64 0}
// CHECK:STDOUT: !124 = !{!123, !123, i64 0}
// CHECK:STDOUT: !125 = !{!"short", !121, i64 0}
// CHECK:STDOUT: !126 = !{!"p1 short", !122, i64 0}
// CHECK:STDOUT: !127 = !{!126, !126, i64 0}
// CHECK:STDOUT: !128 = !{!"int", !121, i64 0}
// CHECK:STDOUT: !129 = !{!128, !128, i64 0}
// CHECK:STDOUT: !130 = !{!"long", !121, i64 0}
// CHECK:STDOUT: !131 = !{!130, !130, i64 0}
// CHECK:STDOUT: !132 = !{!121, !121, i64 0}
// CHECK:STDOUT: !133 = !{!125, !125, i64 0}
// CHECK:STDOUT: !134 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !135 = !{i32 7, !"PIE Level", i32 2}
// CHECK:STDOUT: !136 = !{i32 7, !"uwtable", i32 2}
// CHECK:STDOUT: !137 = !{!"__libc_errno", !128, i64 0}
// CHECK:STDOUT: !138 = !{!137, !128, i64 0}
// CHECK:STDOUT:
// CHECK:STDOUT: ; ---
// CHECK:STDOUT: ; ModuleID = 'import_struct.carbon'
@@ -452,36 +408,36 @@ fn PassValueExpr(y: Cpp.Y) {
// CHECK:STDOUT: %struct.X = type { i32, i32, i32 }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define void @_CTest.Main() #0 !dbg !159 {
// CHECK:STDOUT: define void @_CTest.Main() #0 !dbg !143 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %x.var = alloca [12 x i8], align 4, !dbg !160
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !160
// CHECK:STDOUT: call void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.102476b7ae87d0a1"(ptr %x.var), !dbg !160
// CHECK:STDOUT: %.loc8_4.a = getelementptr inbounds nuw [12 x i8], ptr %x.var, i32 0, i32 0, !dbg !162
// CHECK:STDOUT: store i32 1, ptr %.loc8_4.a, align 4, !dbg !162
// CHECK:STDOUT: %.loc9_4.b = getelementptr inbounds nuw [12 x i8], ptr %x.var, i32 0, i32 4, !dbg !163
// CHECK:STDOUT: store i32 2, ptr %.loc9_4.b, align 4, !dbg !163
// CHECK:STDOUT: %.loc10_4.c = getelementptr inbounds nuw [12 x i8], ptr %x.var, i32 0, i32 8, !dbg !164
// CHECK:STDOUT: store i32 3, ptr %.loc10_4.c, align 4, !dbg !164
// CHECK:STDOUT: call void @_Z11pass_struct1X.carbon_thunk._(ptr %x.var), !dbg !166
// CHECK:STDOUT: call void @"_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core"(ptr %x.var), !dbg !160
// CHECK:STDOUT: ret void, !dbg !167
// CHECK:STDOUT: %x.var = alloca [12 x i8], align 4, !dbg !144
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !144
// CHECK:STDOUT: call void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.102476b7ae87d0a1"(ptr %x.var), !dbg !144
// CHECK:STDOUT: %.loc8_4.a = getelementptr inbounds nuw [12 x i8], ptr %x.var, i32 0, i32 0, !dbg !146
// CHECK:STDOUT: store i32 1, ptr %.loc8_4.a, align 4, !dbg !146
// CHECK:STDOUT: %.loc9_4.b = getelementptr inbounds nuw [12 x i8], ptr %x.var, i32 0, i32 4, !dbg !147
// CHECK:STDOUT: store i32 2, ptr %.loc9_4.b, align 4, !dbg !147
// CHECK:STDOUT: %.loc10_4.c = getelementptr inbounds nuw [12 x i8], ptr %x.var, i32 0, i32 8, !dbg !148
// CHECK:STDOUT: store i32 3, ptr %.loc10_4.c, align 4, !dbg !148
// CHECK:STDOUT: call void @_Z11pass_struct1X.carbon_thunk._(ptr %x.var), !dbg !150
// CHECK:STDOUT: call void @"_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core"(ptr %x.var), !dbg !144
// CHECK:STDOUT: ret void, !dbg !151
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress nounwind uwtable
// CHECK:STDOUT: define internal void @_ZN1XC1Ev.carbon_thunk.(ptr noundef %return) #1 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %return.addr = alloca ptr, align 8
// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !181
// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !181
// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !165
// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !165
// CHECK:STDOUT: ret void
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind
// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Default.eed9ddf3aaac414a.Core:X.Cpp"(ptr sret([12 x i8]) %return) #2 !dbg !169 {
// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Default.eed9ddf3aaac414a.Core:X.Cpp"(ptr sret([12 x i8]) %return) #2 !dbg !153 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: call void @_ZN1XC1Ev.carbon_thunk.(ptr %return), !dbg !170
// CHECK:STDOUT: ret void, !dbg !170
// CHECK:STDOUT: call void @_ZN1XC1Ev.carbon_thunk.(ptr %return), !dbg !154
// CHECK:STDOUT: ret void, !dbg !154
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable
@@ -490,9 +446,9 @@ fn PassValueExpr(y: Cpp.Y) {
// CHECK:STDOUT: %.addr = alloca ptr, align 8
// CHECK:STDOUT: %agg.tmp = alloca %struct.X, align 4
// CHECK:STDOUT: %agg.tmp.coerce = alloca { i64, i32 }, align 4
// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !181
// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !181
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %agg.tmp, ptr align 4 %1, i64 12, i1 false), !tbaa.struct !183
// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !165
// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !165
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %agg.tmp, ptr align 4 %1, i64 12, i1 false), !tbaa.struct !167
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %agg.tmp.coerce, ptr align 4 %agg.tmp, i64 12, i1 false)
// CHECK:STDOUT: %2 = getelementptr inbounds nuw { i64, i32 }, ptr %agg.tmp.coerce, i32 0, i32 0
// CHECK:STDOUT: %3 = load i64, ptr %2, align 4
@@ -503,18 +459,18 @@ fn PassValueExpr(y: Cpp.Y) {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core"(ptr %self) #0 !dbg !171 {
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core"(ptr %self) #0 !dbg !155 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: ret void, !dbg !173
// CHECK:STDOUT: ret void, !dbg !157
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
// CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #4
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define linkonce_odr void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.102476b7ae87d0a1"(ptr sret([12 x i8]) %return) #0 !dbg !175 {
// CHECK:STDOUT: call void @"_COp:thunk:Default.eed9ddf3aaac414a.Core:X.Cpp"(ptr %return), !dbg !178
// CHECK:STDOUT: ret void, !dbg !179
// CHECK:STDOUT: define linkonce_odr void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.102476b7ae87d0a1"(ptr sret([12 x i8]) %return) #0 !dbg !159 {
// CHECK:STDOUT: call void @"_COp:thunk:Default.eed9ddf3aaac414a.Core:X.Cpp"(ptr %return), !dbg !162
// CHECK:STDOUT: ret void, !dbg !163
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: declare void @_Z11pass_struct1X(i64, i32) #5
@@ -532,9 +488,9 @@ fn PassValueExpr(y: Cpp.Y) {
// CHECK:STDOUT: attributes #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
// CHECK:STDOUT: attributes #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
// CHECK:STDOUT:
// CHECK:STDOUT: !llvm.dbg.cu = !{!156}
// CHECK:STDOUT: !llvm.module.flags = !{!150, !151, !152, !2, !3}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!154}
// CHECK:STDOUT: !llvm.dbg.cu = !{!140}
// CHECK:STDOUT: !llvm.module.flags = !{!134, !135, !136, !2, !3}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!138}
// CHECK:STDOUT:
// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5}
// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3}
@@ -544,40 +500,40 @@ fn PassValueExpr(y: Cpp.Y) {
// CHECK:STDOUT: !42 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64)
// CHECK:STDOUT: !59 = !{null, !42}
// CHECK:STDOUT: !60 = !DISubroutineType(types: !59)
// CHECK:STDOUT: !136 = !{!"Simple C++ TBAA"}
// CHECK:STDOUT: !137 = !{!"omnipotent char", !136, i64 0}
// CHECK:STDOUT: !138 = !{!"any pointer", !137, i64 0}
// CHECK:STDOUT: !144 = !{!"int", !137, i64 0}
// CHECK:STDOUT: !145 = !{!144, !144, i64 0}
// CHECK:STDOUT: !150 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !151 = !{i32 7, !"PIE Level", i32 2}
// CHECK:STDOUT: !152 = !{i32 7, !"uwtable", i32 2}
// CHECK:STDOUT: !153 = !{!"__libc_errno", !144, i64 0}
// CHECK:STDOUT: !154 = !{!153, !144, i64 0}
// CHECK:STDOUT: !155 = !DIFile(filename: "import_struct.carbon", directory: "")
// CHECK:STDOUT: !156 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !155, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
// CHECK:STDOUT: !157 = !{!42}
// CHECK:STDOUT: !158 = !DISubroutineType(types: !157)
// CHECK:STDOUT: !159 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !155, line: 6, type: !41, spFlags: DISPFlagDefinition, unit: !156)
// CHECK:STDOUT: !160 = !DILocation(line: 7, column: 3, scope: !159)
// CHECK:STDOUT: !162 = !DILocation(line: 8, column: 3, scope: !159)
// CHECK:STDOUT: !163 = !DILocation(line: 9, column: 3, scope: !159)
// CHECK:STDOUT: !164 = !DILocation(line: 10, column: 3, scope: !159)
// CHECK:STDOUT: !166 = !DILocation(line: 11, column: 3, scope: !159)
// CHECK:STDOUT: !167 = !DILocation(line: 6, column: 1, scope: !159)
// CHECK:STDOUT: !168 = !DIFile(filename: "./struct.h", directory: "")
// CHECK:STDOUT: !169 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.eed9ddf3aaac414a.Core:X.Cpp", scope: null, file: !168, line: 2, type: !158, spFlags: DISPFlagDefinition, unit: !156)
// CHECK:STDOUT: !170 = !DILocation(line: 2, column: 8, scope: !169)
// CHECK:STDOUT: !171 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core", scope: null, file: !155, line: 7, type: !60, spFlags: DISPFlagDefinition, unit: !156, retainedNodes: !174)
// CHECK:STDOUT: !172 = !DILocalVariable(arg: 1, scope: !171, type: !42)
// CHECK:STDOUT: !173 = !DILocation(line: 7, column: 3, scope: !171)
// CHECK:STDOUT: !174 = !{!172}
// CHECK:STDOUT: !175 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.102476b7ae87d0a1", scope: null, file: !26, line: 9, type: !158, spFlags: DISPFlagDefinition, unit: !156)
// CHECK:STDOUT: !178 = !DILocation(line: 9, column: 28, scope: !175)
// CHECK:STDOUT: !179 = !DILocation(line: 9, column: 21, scope: !175)
// CHECK:STDOUT: !180 = !{!"p1 _ZTS1X", !138, i64 0}
// CHECK:STDOUT: !181 = !{!180, !180, i64 0}
// CHECK:STDOUT: !183 = !{i64 0, i64 4, !145, i64 4, i64 4, !145, i64 8, i64 4, !145}
// CHECK:STDOUT: !120 = !{!"Simple C++ TBAA"}
// CHECK:STDOUT: !121 = !{!"omnipotent char", !120, i64 0}
// CHECK:STDOUT: !122 = !{!"any pointer", !121, i64 0}
// CHECK:STDOUT: !128 = !{!"int", !121, i64 0}
// CHECK:STDOUT: !129 = !{!128, !128, i64 0}
// CHECK:STDOUT: !134 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !135 = !{i32 7, !"PIE Level", i32 2}
// CHECK:STDOUT: !136 = !{i32 7, !"uwtable", i32 2}
// CHECK:STDOUT: !137 = !{!"__libc_errno", !128, i64 0}
// CHECK:STDOUT: !138 = !{!137, !128, i64 0}
// CHECK:STDOUT: !139 = !DIFile(filename: "import_struct.carbon", directory: "")
// CHECK:STDOUT: !140 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !139, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
// CHECK:STDOUT: !141 = !{!42}
// CHECK:STDOUT: !142 = !DISubroutineType(types: !141)
// CHECK:STDOUT: !143 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !139, line: 6, type: !41, spFlags: DISPFlagDefinition, unit: !140)
// CHECK:STDOUT: !144 = !DILocation(line: 7, column: 3, scope: !143)
// CHECK:STDOUT: !146 = !DILocation(line: 8, column: 3, scope: !143)
// CHECK:STDOUT: !147 = !DILocation(line: 9, column: 3, scope: !143)
// CHECK:STDOUT: !148 = !DILocation(line: 10, column: 3, scope: !143)
// CHECK:STDOUT: !150 = !DILocation(line: 11, column: 3, scope: !143)
// CHECK:STDOUT: !151 = !DILocation(line: 6, column: 1, scope: !143)
// CHECK:STDOUT: !152 = !DIFile(filename: "./struct.h", directory: "")
// CHECK:STDOUT: !153 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.eed9ddf3aaac414a.Core:X.Cpp", scope: null, file: !152, line: 2, type: !142, spFlags: DISPFlagDefinition, unit: !140)
// CHECK:STDOUT: !154 = !DILocation(line: 2, column: 8, scope: !153)
// CHECK:STDOUT: !155 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core", scope: null, file: !139, line: 7, type: !60, spFlags: DISPFlagDefinition, unit: !140, retainedNodes: !158)
// CHECK:STDOUT: !156 = !DILocalVariable(arg: 1, scope: !155, type: !42)
// CHECK:STDOUT: !157 = !DILocation(line: 7, column: 3, scope: !155)
// CHECK:STDOUT: !158 = !{!156}
// CHECK:STDOUT: !159 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.102476b7ae87d0a1", scope: null, file: !26, line: 9, type: !142, spFlags: DISPFlagDefinition, unit: !140)
// CHECK:STDOUT: !162 = !DILocation(line: 9, column: 28, scope: !159)
// CHECK:STDOUT: !163 = !DILocation(line: 9, column: 21, scope: !159)
// CHECK:STDOUT: !164 = !{!"p1 _ZTS1X", !122, i64 0}
// CHECK:STDOUT: !165 = !{!164, !164, i64 0}
// CHECK:STDOUT: !167 = !{i64 0, i64 4, !129, i64 4, i64 4, !129, i64 8, i64 4, !129}
// CHECK:STDOUT:
// CHECK:STDOUT: ; ---
// CHECK:STDOUT: ; ModuleID = 'import_class_with_nontrivial_copy.carbon'
@@ -588,19 +544,19 @@ fn PassValueExpr(y: Cpp.Y) {
// CHECK:STDOUT: %class.Y = type { i32, i32, i32 }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define void @_CPassRefExpr.Main() #0 !dbg !186 {
// CHECK:STDOUT: define void @_CPassRefExpr.Main() #0 !dbg !170 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %y.var = alloca [12 x i8], align 4, !dbg !187
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %y.var), !dbg !187
// CHECK:STDOUT: %.loc8_4.a = getelementptr inbounds nuw [12 x i8], ptr %y.var, i32 0, i32 0, !dbg !189
// CHECK:STDOUT: store i32 1, ptr %.loc8_4.a, align 4, !dbg !189
// CHECK:STDOUT: %.loc9_4.b = getelementptr inbounds nuw [12 x i8], ptr %y.var, i32 0, i32 4, !dbg !190
// CHECK:STDOUT: store i32 2, ptr %.loc9_4.b, align 4, !dbg !190
// CHECK:STDOUT: %.loc10_4.c = getelementptr inbounds nuw [12 x i8], ptr %y.var, i32 0, i32 8, !dbg !191
// CHECK:STDOUT: store i32 3, ptr %.loc10_4.c, align 4, !dbg !191
// CHECK:STDOUT: call void @_Z11pass_struct1Y.carbon_thunk._(ptr %y.var), !dbg !193
// CHECK:STDOUT: call void @"_CSelfDestruct.988e3d50a7ba5577:core.Destroy.Core"(ptr %y.var), !dbg !187
// CHECK:STDOUT: ret void, !dbg !194
// CHECK:STDOUT: %y.var = alloca [12 x i8], align 4, !dbg !171
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %y.var), !dbg !171
// CHECK:STDOUT: %.loc8_4.a = getelementptr inbounds nuw [12 x i8], ptr %y.var, i32 0, i32 0, !dbg !173
// CHECK:STDOUT: store i32 1, ptr %.loc8_4.a, align 4, !dbg !173
// CHECK:STDOUT: %.loc9_4.b = getelementptr inbounds nuw [12 x i8], ptr %y.var, i32 0, i32 4, !dbg !174
// CHECK:STDOUT: store i32 2, ptr %.loc9_4.b, align 4, !dbg !174
// CHECK:STDOUT: %.loc10_4.c = getelementptr inbounds nuw [12 x i8], ptr %y.var, i32 0, i32 8, !dbg !175
// CHECK:STDOUT: store i32 3, ptr %.loc10_4.c, align 4, !dbg !175
// CHECK:STDOUT: call void @_Z11pass_struct1Y.carbon_thunk._(ptr %y.var), !dbg !177
// CHECK:STDOUT: call void @"_CSelfDestruct.988e3d50a7ba5577:core.Destroy.Core"(ptr %y.var), !dbg !171
// CHECK:STDOUT: ret void, !dbg !178
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable
@@ -608,37 +564,37 @@ fn PassValueExpr(y: Cpp.Y) {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %.addr = alloca ptr, align 8
// CHECK:STDOUT: %agg.tmp = alloca %class.Y, align 4
// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !211
// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !211
// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !195
// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !195
// CHECK:STDOUT: call void @_ZN1YC1ERKS_(ptr noundef nonnull align 4 dereferenceable(12) %agg.tmp, ptr noundef nonnull align 4 dereferenceable(12) %1)
// CHECK:STDOUT: call void @_Z11pass_struct1Y(ptr nofreeobj noundef align 4 dead_on_return dereferenceable(12) %agg.tmp)
// CHECK:STDOUT: ret void
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.988e3d50a7ba5577:core.Destroy.Core"(ptr %self) #0 !dbg !195 {
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.988e3d50a7ba5577:core.Destroy.Core"(ptr %self) #0 !dbg !179 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: ret void, !dbg !197
// CHECK:STDOUT: ret void, !dbg !181
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: declare void @_CMake.Main(ptr sret([12 x i8]))
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define void @_CPassInitExpr.Main() #0 !dbg !199 {
// CHECK:STDOUT: define void @_CPassInitExpr.Main() #0 !dbg !183 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %.loc17_24.1.temp = alloca [12 x i8], align 4, !dbg !200
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc17_24.1.temp), !dbg !200
// CHECK:STDOUT: call void @_CMake.Main(ptr %.loc17_24.1.temp), !dbg !200
// CHECK:STDOUT: call void @_Z11pass_struct1Y.carbon_thunk._(ptr %.loc17_24.1.temp), !dbg !201
// CHECK:STDOUT: call void @"_CSelfDestruct.988e3d50a7ba5577:core.Destroy.Core"(ptr %.loc17_24.1.temp), !dbg !200
// CHECK:STDOUT: ret void, !dbg !202
// CHECK:STDOUT: %.loc17_24.1.temp = alloca [12 x i8], align 4, !dbg !184
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc17_24.1.temp), !dbg !184
// CHECK:STDOUT: call void @_CMake.Main(ptr %.loc17_24.1.temp), !dbg !184
// CHECK:STDOUT: call void @_Z11pass_struct1Y.carbon_thunk._(ptr %.loc17_24.1.temp), !dbg !185
// CHECK:STDOUT: call void @"_CSelfDestruct.988e3d50a7ba5577:core.Destroy.Core"(ptr %.loc17_24.1.temp), !dbg !184
// CHECK:STDOUT: ret void, !dbg !186
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define void @_CPassValueExpr.Main(ptr %y) #0 !dbg !203 {
// CHECK:STDOUT: define void @_CPassValueExpr.Main(ptr %y) #0 !dbg !187 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: call void @_Z11pass_struct1Y.carbon_thunk._(ptr %y), !dbg !207
// CHECK:STDOUT: ret void, !dbg !208
// CHECK:STDOUT: call void @_Z11pass_struct1Y.carbon_thunk._(ptr %y), !dbg !191
// CHECK:STDOUT: ret void, !dbg !192
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
@@ -656,9 +612,9 @@ fn PassValueExpr(y: Cpp.Y) {
// CHECK:STDOUT: attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
// CHECK:STDOUT: attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
// CHECK:STDOUT:
// CHECK:STDOUT: !llvm.dbg.cu = !{!185}
// CHECK:STDOUT: !llvm.module.flags = !{!150, !151, !152, !2, !3}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!154}
// CHECK:STDOUT: !llvm.dbg.cu = !{!169}
// CHECK:STDOUT: !llvm.module.flags = !{!134, !135, !136, !2, !3}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!138}
// CHECK:STDOUT:
// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5}
// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3}
@@ -667,37 +623,37 @@ fn PassValueExpr(y: Cpp.Y) {
// CHECK:STDOUT: !42 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64)
// CHECK:STDOUT: !59 = !{null, !42}
// CHECK:STDOUT: !60 = !DISubroutineType(types: !59)
// CHECK:STDOUT: !136 = !{!"Simple C++ TBAA"}
// CHECK:STDOUT: !137 = !{!"omnipotent char", !136, i64 0}
// CHECK:STDOUT: !138 = !{!"any pointer", !137, i64 0}
// CHECK:STDOUT: !144 = !{!"int", !137, i64 0}
// CHECK:STDOUT: !150 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !151 = !{i32 7, !"PIE Level", i32 2}
// CHECK:STDOUT: !152 = !{i32 7, !"uwtable", i32 2}
// CHECK:STDOUT: !153 = !{!"__libc_errno", !144, i64 0}
// CHECK:STDOUT: !154 = !{!153, !144, i64 0}
// CHECK:STDOUT: !184 = !DIFile(filename: "import_class_with_nontrivial_copy.carbon", directory: "")
// CHECK:STDOUT: !185 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !184, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
// CHECK:STDOUT: !186 = distinct !DISubprogram(name: "PassRefExpr", linkageName: "_CPassRefExpr.Main", scope: null, file: !184, line: 6, type: !41, spFlags: DISPFlagDefinition, unit: !185)
// CHECK:STDOUT: !187 = !DILocation(line: 7, column: 3, scope: !186)
// CHECK:STDOUT: !189 = !DILocation(line: 8, column: 3, scope: !186)
// CHECK:STDOUT: !190 = !DILocation(line: 9, column: 3, scope: !186)
// CHECK:STDOUT: !191 = !DILocation(line: 10, column: 3, scope: !186)
// CHECK:STDOUT: !193 = !DILocation(line: 11, column: 3, scope: !186)
// CHECK:STDOUT: !194 = !DILocation(line: 6, column: 1, scope: !186)
// CHECK:STDOUT: !195 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.988e3d50a7ba5577:core.Destroy.Core", scope: null, file: !184, line: 7, type: !60, spFlags: DISPFlagDefinition, unit: !185, retainedNodes: !198)
// CHECK:STDOUT: !196 = !DILocalVariable(arg: 1, scope: !195, type: !42)
// CHECK:STDOUT: !197 = !DILocation(line: 7, column: 3, scope: !195)
// CHECK:STDOUT: !198 = !{!196}
// CHECK:STDOUT: !199 = distinct !DISubprogram(name: "PassInitExpr", linkageName: "_CPassInitExpr.Main", scope: null, file: !184, line: 16, type: !41, spFlags: DISPFlagDefinition, unit: !185)
// CHECK:STDOUT: !200 = !DILocation(line: 17, column: 19, scope: !199)
// CHECK:STDOUT: !201 = !DILocation(line: 17, column: 3, scope: !199)
// CHECK:STDOUT: !202 = !DILocation(line: 16, column: 1, scope: !199)
// CHECK:STDOUT: !203 = distinct !DISubprogram(name: "PassValueExpr", linkageName: "_CPassValueExpr.Main", scope: null, file: !184, line: 20, type: !60, spFlags: DISPFlagDefinition, unit: !185, retainedNodes: !209)
// CHECK:STDOUT: !204 = !DILocalVariable(arg: 1, scope: !203, type: !42)
// CHECK:STDOUT: !207 = !DILocation(line: 21, column: 3, scope: !203)
// CHECK:STDOUT: !208 = !DILocation(line: 20, column: 1, scope: !203)
// CHECK:STDOUT: !209 = !{!204}
// CHECK:STDOUT: !210 = !{!"p1 _ZTS1Y", !138, i64 0}
// CHECK:STDOUT: !211 = !{!210, !210, i64 0}
// CHECK:STDOUT: !120 = !{!"Simple C++ TBAA"}
// CHECK:STDOUT: !121 = !{!"omnipotent char", !120, i64 0}
// CHECK:STDOUT: !122 = !{!"any pointer", !121, i64 0}
// CHECK:STDOUT: !128 = !{!"int", !121, i64 0}
// CHECK:STDOUT: !134 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !135 = !{i32 7, !"PIE Level", i32 2}
// CHECK:STDOUT: !136 = !{i32 7, !"uwtable", i32 2}
// CHECK:STDOUT: !137 = !{!"__libc_errno", !128, i64 0}
// CHECK:STDOUT: !138 = !{!137, !128, i64 0}
// CHECK:STDOUT: !168 = !DIFile(filename: "import_class_with_nontrivial_copy.carbon", directory: "")
// CHECK:STDOUT: !169 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !168, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
// CHECK:STDOUT: !170 = distinct !DISubprogram(name: "PassRefExpr", linkageName: "_CPassRefExpr.Main", scope: null, file: !168, line: 6, type: !41, spFlags: DISPFlagDefinition, unit: !169)
// CHECK:STDOUT: !171 = !DILocation(line: 7, column: 3, scope: !170)
// CHECK:STDOUT: !173 = !DILocation(line: 8, column: 3, scope: !170)
// CHECK:STDOUT: !174 = !DILocation(line: 9, column: 3, scope: !170)
// CHECK:STDOUT: !175 = !DILocation(line: 10, column: 3, scope: !170)
// CHECK:STDOUT: !177 = !DILocation(line: 11, column: 3, scope: !170)
// CHECK:STDOUT: !178 = !DILocation(line: 6, column: 1, scope: !170)
// CHECK:STDOUT: !179 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.988e3d50a7ba5577:core.Destroy.Core", scope: null, file: !168, line: 7, type: !60, spFlags: DISPFlagDefinition, unit: !169, retainedNodes: !182)
// CHECK:STDOUT: !180 = !DILocalVariable(arg: 1, scope: !179, type: !42)
// CHECK:STDOUT: !181 = !DILocation(line: 7, column: 3, scope: !179)
// CHECK:STDOUT: !182 = !{!180}
// CHECK:STDOUT: !183 = distinct !DISubprogram(name: "PassInitExpr", linkageName: "_CPassInitExpr.Main", scope: null, file: !168, line: 16, type: !41, spFlags: DISPFlagDefinition, unit: !169)
// CHECK:STDOUT: !184 = !DILocation(line: 17, column: 19, scope: !183)
// CHECK:STDOUT: !185 = !DILocation(line: 17, column: 3, scope: !183)
// CHECK:STDOUT: !186 = !DILocation(line: 16, column: 1, scope: !183)
// CHECK:STDOUT: !187 = distinct !DISubprogram(name: "PassValueExpr", linkageName: "_CPassValueExpr.Main", scope: null, file: !168, line: 20, type: !60, spFlags: DISPFlagDefinition, unit: !169, retainedNodes: !193)
// CHECK:STDOUT: !188 = !DILocalVariable(arg: 1, scope: !187, type: !42)
// CHECK:STDOUT: !191 = !DILocation(line: 21, column: 3, scope: !187)
// CHECK:STDOUT: !192 = !DILocation(line: 20, column: 1, scope: !187)
// CHECK:STDOUT: !193 = !{!188}
// CHECK:STDOUT: !194 = !{!"p1 _ZTS1Y", !122, i64 0}
// CHECK:STDOUT: !195 = !{!194, !194, i64 0}
// CHECK:STDOUT:
@@ -132,10 +132,10 @@ fn Call(x: Cpp.D) -> Cpp.C {
// CHECK:STDOUT: define internal void @_Z8ReturnU8v.carbon_thunk.(ptr noundef %return) #1 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %return.addr = alloca ptr, align 8
// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !263
// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !263
// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !231
// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !231
// CHECK:STDOUT: %call = call noundef zeroext i8 @_Z8ReturnU8v()
// CHECK:STDOUT: store i8 %call, ptr %0, align 1, !tbaa !264
// CHECK:STDOUT: store i8 %call, ptr %0, align 1, !tbaa !232
// CHECK:STDOUT: ret void
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -153,10 +153,10 @@ fn Call(x: Cpp.D) -> Cpp.C {
// CHECK:STDOUT: define internal void @_Z9ReturnU16v.carbon_thunk.(ptr noundef %return) #1 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %return.addr = alloca ptr, align 8
// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !267
// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !267
// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !235
// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !235
// CHECK:STDOUT: %call = call noundef zeroext i16 @_Z9ReturnU16v()
// CHECK:STDOUT: store i16 %call, ptr %0, align 2, !tbaa !268
// CHECK:STDOUT: store i16 %call, ptr %0, align 2, !tbaa !236
// CHECK:STDOUT: ret void
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -192,10 +192,10 @@ fn Call(x: Cpp.D) -> Cpp.C {
// CHECK:STDOUT: define internal void @_Z8ReturnI8v.carbon_thunk.(ptr noundef %return) #1 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %return.addr = alloca ptr, align 8
// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !263
// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !263
// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !231
// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !231
// CHECK:STDOUT: %call = call noundef signext i8 @_Z8ReturnI8v()
// CHECK:STDOUT: store i8 %call, ptr %0, align 1, !tbaa !264
// CHECK:STDOUT: store i8 %call, ptr %0, align 1, !tbaa !232
// CHECK:STDOUT: ret void
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -213,10 +213,10 @@ fn Call(x: Cpp.D) -> Cpp.C {
// CHECK:STDOUT: define internal void @_Z9ReturnI16v.carbon_thunk.(ptr noundef %return) #1 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %return.addr = alloca ptr, align 8
// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !267
// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !267
// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !235
// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !235
// CHECK:STDOUT: %call = call noundef signext i16 @_Z9ReturnI16v()
// CHECK:STDOUT: store i16 %call, ptr %0, align 2, !tbaa !268
// CHECK:STDOUT: store i16 %call, ptr %0, align 2, !tbaa !236
// CHECK:STDOUT: ret void
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -278,202 +278,146 @@ fn Call(x: Cpp.D) -> Cpp.C {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.d57cb32fcf12ec07:core.Destroy.Core"(ptr %self) #0 !dbg !132 {
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %self) #0 !dbg !132 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: ret void, !dbg !134
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %self) #0 !dbg !136 {
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c4a4fcc00062c7f0:core.Destroy.Core"(ptr %self) #0 !dbg !136 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: call void @"_CSubobjectDestroy.d57cb32fcf12ec07:core.Destroy.Core"(ptr %self), !dbg !138
// CHECK:STDOUT: ret void, !dbg !138
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c4a4fcc00062c7f0:core.Destroy.Core"(ptr %self) #0 !dbg !140 {
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.4954785a8b134801:core.Destroy.Core"(ptr %self) #0 !dbg !140 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: ret void, !dbg !142
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.4954785a8b134801:core.Destroy.Core"(ptr %self) #0 !dbg !144 {
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.99892fadd247b492:core.Destroy.Core"(ptr %self) #0 !dbg !144 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: ret void, !dbg !146
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.4954785a8b134801:core.Destroy.Core"(ptr %self) #0 !dbg !148 {
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3bc9e5dacf328f74:core.Destroy.Core"(ptr %self) #0 !dbg !148 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: call void @"_CSubobjectDestroy.4954785a8b134801:core.Destroy.Core"(ptr %self), !dbg !150
// CHECK:STDOUT: ret void, !dbg !150
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.99892fadd247b492:core.Destroy.Core"(ptr %self) #0 !dbg !152 {
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.04514f1c5a56b0cb:core.Destroy.Core"(ptr %self) #0 !dbg !152 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: ret void, !dbg !154
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.3bc9e5dacf328f74:core.Destroy.Core"(ptr %self) #0 !dbg !156 {
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.be60742f00557eec:core.Destroy.Core"(ptr %self) #0 !dbg !156 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: ret void, !dbg !158
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3bc9e5dacf328f74:core.Destroy.Core"(ptr %self) #0 !dbg !160 {
// CHECK:STDOUT: define void @_CVars.Main() #0 !dbg !160 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: call void @"_CSubobjectDestroy.3bc9e5dacf328f74:core.Destroy.Core"(ptr %self), !dbg !162
// CHECK:STDOUT: ret void, !dbg !162
// CHECK:STDOUT: %my_u8.var = alloca i8, align 1, !dbg !161
// CHECK:STDOUT: %my_u16.var = alloca i16, align 2, !dbg !164
// CHECK:STDOUT: %my_u32.var = alloca i32, align 4, !dbg !167
// CHECK:STDOUT: %my_u64.var = alloca i64, align 8, !dbg !170
// CHECK:STDOUT: %my_i8.var = alloca i8, align 1, !dbg !173
// CHECK:STDOUT: %my_i16.var = alloca i16, align 2, !dbg !176
// CHECK:STDOUT: %my_i32.var = alloca i32, align 4, !dbg !179
// CHECK:STDOUT: %my_i64.var = alloca i64, align 8, !dbg !182
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_u8.var), !dbg !161
// CHECK:STDOUT: call void @_Z8ReturnU8v.carbon_thunk.(ptr %my_u8.var), !dbg !162
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_u16.var), !dbg !164
// CHECK:STDOUT: call void @_Z9ReturnU16v.carbon_thunk.(ptr %my_u16.var), !dbg !165
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_u32.var), !dbg !167
// CHECK:STDOUT: %ReturnU32.call = call i32 @_Z9ReturnU32v(), !dbg !168
// CHECK:STDOUT: store i32 %ReturnU32.call, ptr %my_u32.var, align 4, !dbg !167
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_u64.var), !dbg !170
// CHECK:STDOUT: %ReturnU64.call = call i64 @_Z9ReturnU64v(), !dbg !171
// CHECK:STDOUT: store i64 %ReturnU64.call, ptr %my_u64.var, align 8, !dbg !170
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_i8.var), !dbg !173
// CHECK:STDOUT: call void @_Z8ReturnI8v.carbon_thunk.(ptr %my_i8.var), !dbg !174
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_i16.var), !dbg !176
// CHECK:STDOUT: call void @_Z9ReturnI16v.carbon_thunk.(ptr %my_i16.var), !dbg !177
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_i32.var), !dbg !179
// CHECK:STDOUT: %ReturnI32.call = call i32 @_Z9ReturnI32v(), !dbg !180
// CHECK:STDOUT: store i32 %ReturnI32.call, ptr %my_i32.var, align 4, !dbg !179
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_i64.var), !dbg !182
// CHECK:STDOUT: %ReturnI64.call = call i64 @_Z9ReturnI64v(), !dbg !183
// CHECK:STDOUT: store i64 %ReturnI64.call, ptr %my_i64.var, align 8, !dbg !182
// CHECK:STDOUT: %.loc43_7 = load i8, ptr %my_u8.var, align 1, !dbg !185
// CHECK:STDOUT: %.loc43_14 = load i16, ptr %my_u16.var, align 2, !dbg !186
// CHECK:STDOUT: %.loc43_22 = load i32, ptr %my_u32.var, align 4, !dbg !187
// CHECK:STDOUT: %.loc43_30 = load i64, ptr %my_u64.var, align 8, !dbg !188
// CHECK:STDOUT: %.loc43_38 = load i8, ptr %my_i8.var, align 1, !dbg !189
// CHECK:STDOUT: %.loc43_45 = load i16, ptr %my_i16.var, align 2, !dbg !190
// CHECK:STDOUT: %.loc43_53 = load i32, ptr %my_i32.var, align 4, !dbg !191
// CHECK:STDOUT: %.loc43_61 = load i64, ptr %my_i64.var, align 8, !dbg !192
// CHECK:STDOUT: call void @_CUse.Main(i8 %.loc43_7, i16 %.loc43_14, i32 %.loc43_22, i64 %.loc43_30, i8 %.loc43_38, i16 %.loc43_45, i32 %.loc43_53, i64 %.loc43_61), !dbg !193
// CHECK:STDOUT: call void @"_CSelfDestruct.5aacfd7dcc330b17:core.Destroy.Core"(ptr %my_i64.var), !dbg !182
// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %my_i32.var), !dbg !179
// CHECK:STDOUT: call void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %my_i16.var), !dbg !176
// CHECK:STDOUT: call void @"_CSelfDestruct.4954785a8b134801:core.Destroy.Core"(ptr %my_i8.var), !dbg !173
// CHECK:STDOUT: call void @"_CSelfDestruct.18a2a1ac0d16cf80:core.Destroy.Core"(ptr %my_u64.var), !dbg !170
// CHECK:STDOUT: call void @"_CSelfDestruct.ea3ccedbd6a1c75d:core.Destroy.Core"(ptr %my_u32.var), !dbg !167
// CHECK:STDOUT: call void @"_CSelfDestruct.3bc9e5dacf328f74:core.Destroy.Core"(ptr %my_u16.var), !dbg !164
// CHECK:STDOUT: call void @"_CSelfDestruct.be60742f00557eec:core.Destroy.Core"(ptr %my_u8.var), !dbg !161
// CHECK:STDOUT: ret void, !dbg !194
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.04514f1c5a56b0cb:core.Destroy.Core"(ptr %self) #0 !dbg !164 {
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6e5a4ef51c9e705a:core.Destroy.Core"(ptr %self) #0 !dbg !195 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: ret void, !dbg !166
// CHECK:STDOUT: ret void, !dbg !197
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.be60742f00557eec:core.Destroy.Core"(ptr %self) #0 !dbg !168 {
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.5aacfd7dcc330b17:core.Destroy.Core"(ptr %self) #0 !dbg !199 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: ret void, !dbg !170
// CHECK:STDOUT: ret void, !dbg !201
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.be60742f00557eec:core.Destroy.Core"(ptr %self) #0 !dbg !172 {
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !203 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: call void @"_CSubobjectDestroy.be60742f00557eec:core.Destroy.Core"(ptr %self), !dbg !174
// CHECK:STDOUT: ret void, !dbg !174
// CHECK:STDOUT: ret void, !dbg !205
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define void @_CVars.Main() #0 !dbg !176 {
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !207 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %my_u8.var = alloca i8, align 1, !dbg !177
// CHECK:STDOUT: %my_u16.var = alloca i16, align 2, !dbg !180
// CHECK:STDOUT: %my_u32.var = alloca i32, align 4, !dbg !183
// CHECK:STDOUT: %my_u64.var = alloca i64, align 8, !dbg !186
// CHECK:STDOUT: %my_i8.var = alloca i8, align 1, !dbg !189
// CHECK:STDOUT: %my_i16.var = alloca i16, align 2, !dbg !192
// CHECK:STDOUT: %my_i32.var = alloca i32, align 4, !dbg !195
// CHECK:STDOUT: %my_i64.var = alloca i64, align 8, !dbg !198
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_u8.var), !dbg !177
// CHECK:STDOUT: call void @_Z8ReturnU8v.carbon_thunk.(ptr %my_u8.var), !dbg !178
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_u16.var), !dbg !180
// CHECK:STDOUT: call void @_Z9ReturnU16v.carbon_thunk.(ptr %my_u16.var), !dbg !181
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_u32.var), !dbg !183
// CHECK:STDOUT: %ReturnU32.call = call i32 @_Z9ReturnU32v(), !dbg !184
// CHECK:STDOUT: store i32 %ReturnU32.call, ptr %my_u32.var, align 4, !dbg !183
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_u64.var), !dbg !186
// CHECK:STDOUT: %ReturnU64.call = call i64 @_Z9ReturnU64v(), !dbg !187
// CHECK:STDOUT: store i64 %ReturnU64.call, ptr %my_u64.var, align 8, !dbg !186
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_i8.var), !dbg !189
// CHECK:STDOUT: call void @_Z8ReturnI8v.carbon_thunk.(ptr %my_i8.var), !dbg !190
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_i16.var), !dbg !192
// CHECK:STDOUT: call void @_Z9ReturnI16v.carbon_thunk.(ptr %my_i16.var), !dbg !193
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_i32.var), !dbg !195
// CHECK:STDOUT: %ReturnI32.call = call i32 @_Z9ReturnI32v(), !dbg !196
// CHECK:STDOUT: store i32 %ReturnI32.call, ptr %my_i32.var, align 4, !dbg !195
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_i64.var), !dbg !198
// CHECK:STDOUT: %ReturnI64.call = call i64 @_Z9ReturnI64v(), !dbg !199
// CHECK:STDOUT: store i64 %ReturnI64.call, ptr %my_i64.var, align 8, !dbg !198
// CHECK:STDOUT: %.loc43_7 = load i8, ptr %my_u8.var, align 1, !dbg !201
// CHECK:STDOUT: %.loc43_14 = load i16, ptr %my_u16.var, align 2, !dbg !202
// CHECK:STDOUT: %.loc43_22 = load i32, ptr %my_u32.var, align 4, !dbg !203
// CHECK:STDOUT: %.loc43_30 = load i64, ptr %my_u64.var, align 8, !dbg !204
// CHECK:STDOUT: %.loc43_38 = load i8, ptr %my_i8.var, align 1, !dbg !205
// CHECK:STDOUT: %.loc43_45 = load i16, ptr %my_i16.var, align 2, !dbg !206
// CHECK:STDOUT: %.loc43_53 = load i32, ptr %my_i32.var, align 4, !dbg !207
// CHECK:STDOUT: %.loc43_61 = load i64, ptr %my_i64.var, align 8, !dbg !208
// CHECK:STDOUT: call void @_CUse.Main(i8 %.loc43_7, i16 %.loc43_14, i32 %.loc43_22, i64 %.loc43_30, i8 %.loc43_38, i16 %.loc43_45, i32 %.loc43_53, i64 %.loc43_61), !dbg !209
// CHECK:STDOUT: call void @"_CSelfDestruct.5aacfd7dcc330b17:core.Destroy.Core"(ptr %my_i64.var), !dbg !198
// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %my_i32.var), !dbg !195
// CHECK:STDOUT: call void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %my_i16.var), !dbg !192
// CHECK:STDOUT: call void @"_CSelfDestruct.4954785a8b134801:core.Destroy.Core"(ptr %my_i8.var), !dbg !189
// CHECK:STDOUT: call void @"_CSelfDestruct.18a2a1ac0d16cf80:core.Destroy.Core"(ptr %my_u64.var), !dbg !186
// CHECK:STDOUT: call void @"_CSelfDestruct.ea3ccedbd6a1c75d:core.Destroy.Core"(ptr %my_u32.var), !dbg !183
// CHECK:STDOUT: call void @"_CSelfDestruct.3bc9e5dacf328f74:core.Destroy.Core"(ptr %my_u16.var), !dbg !180
// CHECK:STDOUT: call void @"_CSelfDestruct.be60742f00557eec:core.Destroy.Core"(ptr %my_u8.var), !dbg !177
// CHECK:STDOUT: ret void, !dbg !210
// CHECK:STDOUT: ret void, !dbg !209
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6e5a4ef51c9e705a:core.Destroy.Core"(ptr %self) #0 !dbg !211 {
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.98b8c1354df43b20:core.Destroy.Core"(ptr %self) #0 !dbg !211 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: ret void, !dbg !213
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.5aacfd7dcc330b17:core.Destroy.Core"(ptr %self) #0 !dbg !215 {
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.18a2a1ac0d16cf80:core.Destroy.Core"(ptr %self) #0 !dbg !215 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: ret void, !dbg !217
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.5aacfd7dcc330b17:core.Destroy.Core"(ptr %self) #0 !dbg !219 {
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b18ca5df050aa3af:core.Destroy.Core"(ptr %self) #0 !dbg !219 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: call void @"_CSubobjectDestroy.5aacfd7dcc330b17:core.Destroy.Core"(ptr %self), !dbg !221
// CHECK:STDOUT: ret void, !dbg !221
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !223 {
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.ea3ccedbd6a1c75d:core.Destroy.Core"(ptr %self) #0 !dbg !223 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: ret void, !dbg !225
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !227 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: ret void, !dbg !229
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !231 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !233
// CHECK:STDOUT: ret void, !dbg !233
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.98b8c1354df43b20:core.Destroy.Core"(ptr %self) #0 !dbg !235 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: ret void, !dbg !237
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.18a2a1ac0d16cf80:core.Destroy.Core"(ptr %self) #0 !dbg !239 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: ret void, !dbg !241
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.18a2a1ac0d16cf80:core.Destroy.Core"(ptr %self) #0 !dbg !243 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: call void @"_CSubobjectDestroy.18a2a1ac0d16cf80:core.Destroy.Core"(ptr %self), !dbg !245
// CHECK:STDOUT: ret void, !dbg !245
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b18ca5df050aa3af:core.Destroy.Core"(ptr %self) #0 !dbg !247 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: ret void, !dbg !249
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.ea3ccedbd6a1c75d:core.Destroy.Core"(ptr %self) #0 !dbg !251 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: ret void, !dbg !253
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.ea3ccedbd6a1c75d:core.Destroy.Core"(ptr %self) #0 !dbg !255 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: call void @"_CSubobjectDestroy.ea3ccedbd6a1c75d:core.Destroy.Core"(ptr %self), !dbg !257
// CHECK:STDOUT: ret void, !dbg !257
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
// CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #3
// CHECK:STDOUT:
@@ -494,8 +438,8 @@ fn Call(x: Cpp.D) -> Cpp.C {
// CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
// CHECK:STDOUT:
// CHECK:STDOUT: !llvm.dbg.cu = !{!5}
// CHECK:STDOUT: !llvm.module.flags = !{!269, !270, !271, !2, !3}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!274}
// CHECK:STDOUT: !llvm.module.flags = !{!237, !238, !239, !2, !3}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!242}
// CHECK:STDOUT:
// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5}
// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3}
@@ -582,141 +526,109 @@ fn Call(x: Cpp.D) -> Cpp.C {
// CHECK:STDOUT: !129 = !DILocalVariable(arg: 1, scope: !128, type: !11)
// CHECK:STDOUT: !130 = !DILocation(line: 25, column: 21, scope: !128)
// CHECK:STDOUT: !131 = !{!129}
// CHECK:STDOUT: !132 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d57cb32fcf12ec07:core.Destroy.Core", scope: null, file: !4, line: 25, type: !38, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !135)
// CHECK:STDOUT: !132 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core", scope: null, file: !4, line: 25, type: !38, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !135)
// CHECK:STDOUT: !133 = !DILocalVariable(arg: 1, scope: !132, type: !11)
// CHECK:STDOUT: !134 = !DILocation(line: 25, column: 21, scope: !132)
// CHECK:STDOUT: !135 = !{!133}
// CHECK:STDOUT: !136 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core", scope: null, file: !4, line: 25, type: !38, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !139)
// CHECK:STDOUT: !137 = !DILocalVariable(arg: 1, scope: !136, type: !11)
// CHECK:STDOUT: !138 = !DILocation(line: 25, column: 21, scope: !136)
// CHECK:STDOUT: !136 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c4a4fcc00062c7f0:core.Destroy.Core", scope: null, file: !4, line: 24, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !139)
// CHECK:STDOUT: !137 = !DILocalVariable(arg: 1, scope: !136, type: !10)
// CHECK:STDOUT: !138 = !DILocation(line: 24, column: 19, scope: !136)
// CHECK:STDOUT: !139 = !{!137}
// CHECK:STDOUT: !140 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c4a4fcc00062c7f0:core.Destroy.Core", scope: null, file: !4, line: 24, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !143)
// CHECK:STDOUT: !140 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.4954785a8b134801:core.Destroy.Core", scope: null, file: !4, line: 24, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !143)
// CHECK:STDOUT: !141 = !DILocalVariable(arg: 1, scope: !140, type: !10)
// CHECK:STDOUT: !142 = !DILocation(line: 24, column: 19, scope: !140)
// CHECK:STDOUT: !143 = !{!141}
// CHECK:STDOUT: !144 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.4954785a8b134801:core.Destroy.Core", scope: null, file: !4, line: 24, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !147)
// CHECK:STDOUT: !145 = !DILocalVariable(arg: 1, scope: !144, type: !10)
// CHECK:STDOUT: !146 = !DILocation(line: 24, column: 19, scope: !144)
// CHECK:STDOUT: !144 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.99892fadd247b492:core.Destroy.Core", scope: null, file: !4, line: 20, type: !42, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !147)
// CHECK:STDOUT: !145 = !DILocalVariable(arg: 1, scope: !144, type: !7)
// CHECK:STDOUT: !146 = !DILocation(line: 20, column: 21, scope: !144)
// CHECK:STDOUT: !147 = !{!145}
// CHECK:STDOUT: !148 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.4954785a8b134801:core.Destroy.Core", scope: null, file: !4, line: 24, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !151)
// CHECK:STDOUT: !149 = !DILocalVariable(arg: 1, scope: !148, type: !10)
// CHECK:STDOUT: !150 = !DILocation(line: 24, column: 19, scope: !148)
// CHECK:STDOUT: !148 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3bc9e5dacf328f74:core.Destroy.Core", scope: null, file: !4, line: 20, type: !42, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !151)
// CHECK:STDOUT: !149 = !DILocalVariable(arg: 1, scope: !148, type: !7)
// CHECK:STDOUT: !150 = !DILocation(line: 20, column: 21, scope: !148)
// CHECK:STDOUT: !151 = !{!149}
// CHECK:STDOUT: !152 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.99892fadd247b492:core.Destroy.Core", scope: null, file: !4, line: 20, type: !42, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !155)
// CHECK:STDOUT: !153 = !DILocalVariable(arg: 1, scope: !152, type: !7)
// CHECK:STDOUT: !154 = !DILocation(line: 20, column: 21, scope: !152)
// CHECK:STDOUT: !152 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.04514f1c5a56b0cb:core.Destroy.Core", scope: null, file: !4, line: 19, type: !44, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !155)
// CHECK:STDOUT: !153 = !DILocalVariable(arg: 1, scope: !152, type: !6)
// CHECK:STDOUT: !154 = !DILocation(line: 19, column: 19, scope: !152)
// CHECK:STDOUT: !155 = !{!153}
// CHECK:STDOUT: !156 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.3bc9e5dacf328f74:core.Destroy.Core", scope: null, file: !4, line: 20, type: !42, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !159)
// CHECK:STDOUT: !157 = !DILocalVariable(arg: 1, scope: !156, type: !7)
// CHECK:STDOUT: !158 = !DILocation(line: 20, column: 21, scope: !156)
// CHECK:STDOUT: !156 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.be60742f00557eec:core.Destroy.Core", scope: null, file: !4, line: 19, type: !44, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !159)
// CHECK:STDOUT: !157 = !DILocalVariable(arg: 1, scope: !156, type: !6)
// CHECK:STDOUT: !158 = !DILocation(line: 19, column: 19, scope: !156)
// CHECK:STDOUT: !159 = !{!157}
// CHECK:STDOUT: !160 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3bc9e5dacf328f74:core.Destroy.Core", scope: null, file: !4, line: 20, type: !42, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !163)
// CHECK:STDOUT: !161 = !DILocalVariable(arg: 1, scope: !160, type: !7)
// CHECK:STDOUT: !162 = !DILocation(line: 20, column: 21, scope: !160)
// CHECK:STDOUT: !163 = !{!161}
// CHECK:STDOUT: !164 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.04514f1c5a56b0cb:core.Destroy.Core", scope: null, file: !4, line: 19, type: !44, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !167)
// CHECK:STDOUT: !165 = !DILocalVariable(arg: 1, scope: !164, type: !6)
// CHECK:STDOUT: !166 = !DILocation(line: 19, column: 19, scope: !164)
// CHECK:STDOUT: !167 = !{!165}
// CHECK:STDOUT: !168 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.be60742f00557eec:core.Destroy.Core", scope: null, file: !4, line: 19, type: !44, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !171)
// CHECK:STDOUT: !169 = !DILocalVariable(arg: 1, scope: !168, type: !6)
// CHECK:STDOUT: !170 = !DILocation(line: 19, column: 19, scope: !168)
// CHECK:STDOUT: !171 = !{!169}
// CHECK:STDOUT: !172 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.be60742f00557eec:core.Destroy.Core", scope: null, file: !4, line: 19, type: !44, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !175)
// CHECK:STDOUT: !173 = !DILocalVariable(arg: 1, scope: !172, type: !6)
// CHECK:STDOUT: !174 = !DILocation(line: 19, column: 19, scope: !172)
// CHECK:STDOUT: !175 = !{!173}
// CHECK:STDOUT: !176 = distinct !DISubprogram(name: "Vars", linkageName: "_CVars.Main", scope: null, file: !4, line: 32, type: !36, spFlags: DISPFlagDefinition, unit: !5)
// CHECK:STDOUT: !177 = !DILocation(line: 33, column: 3, scope: !176)
// CHECK:STDOUT: !178 = !DILocation(line: 33, column: 19, scope: !176)
// CHECK:STDOUT: !180 = !DILocation(line: 34, column: 3, scope: !176)
// CHECK:STDOUT: !181 = !DILocation(line: 34, column: 21, scope: !176)
// CHECK:STDOUT: !183 = !DILocation(line: 35, column: 3, scope: !176)
// CHECK:STDOUT: !184 = !DILocation(line: 35, column: 21, scope: !176)
// CHECK:STDOUT: !186 = !DILocation(line: 36, column: 3, scope: !176)
// CHECK:STDOUT: !187 = !DILocation(line: 36, column: 21, scope: !176)
// CHECK:STDOUT: !189 = !DILocation(line: 38, column: 3, scope: !176)
// CHECK:STDOUT: !190 = !DILocation(line: 38, column: 19, scope: !176)
// CHECK:STDOUT: !192 = !DILocation(line: 39, column: 3, scope: !176)
// CHECK:STDOUT: !193 = !DILocation(line: 39, column: 21, scope: !176)
// CHECK:STDOUT: !195 = !DILocation(line: 40, column: 3, scope: !176)
// CHECK:STDOUT: !196 = !DILocation(line: 40, column: 21, scope: !176)
// CHECK:STDOUT: !198 = !DILocation(line: 41, column: 3, scope: !176)
// CHECK:STDOUT: !199 = !DILocation(line: 41, column: 21, scope: !176)
// CHECK:STDOUT: !201 = !DILocation(line: 43, column: 7, scope: !176)
// CHECK:STDOUT: !202 = !DILocation(line: 43, column: 14, scope: !176)
// CHECK:STDOUT: !203 = !DILocation(line: 43, column: 22, scope: !176)
// CHECK:STDOUT: !204 = !DILocation(line: 43, column: 30, scope: !176)
// CHECK:STDOUT: !205 = !DILocation(line: 43, column: 38, scope: !176)
// CHECK:STDOUT: !206 = !DILocation(line: 43, column: 45, scope: !176)
// CHECK:STDOUT: !207 = !DILocation(line: 43, column: 53, scope: !176)
// CHECK:STDOUT: !208 = !DILocation(line: 43, column: 61, scope: !176)
// CHECK:STDOUT: !209 = !DILocation(line: 43, column: 3, scope: !176)
// CHECK:STDOUT: !210 = !DILocation(line: 32, column: 1, scope: !176)
// CHECK:STDOUT: !211 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6e5a4ef51c9e705a:core.Destroy.Core", scope: null, file: !4, line: 41, type: !46, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !214)
// CHECK:STDOUT: !212 = !DILocalVariable(arg: 1, scope: !211, type: !13)
// CHECK:STDOUT: !213 = !DILocation(line: 41, column: 3, scope: !211)
// CHECK:STDOUT: !160 = distinct !DISubprogram(name: "Vars", linkageName: "_CVars.Main", scope: null, file: !4, line: 32, type: !36, spFlags: DISPFlagDefinition, unit: !5)
// CHECK:STDOUT: !161 = !DILocation(line: 33, column: 3, scope: !160)
// CHECK:STDOUT: !162 = !DILocation(line: 33, column: 19, scope: !160)
// CHECK:STDOUT: !164 = !DILocation(line: 34, column: 3, scope: !160)
// CHECK:STDOUT: !165 = !DILocation(line: 34, column: 21, scope: !160)
// CHECK:STDOUT: !167 = !DILocation(line: 35, column: 3, scope: !160)
// CHECK:STDOUT: !168 = !DILocation(line: 35, column: 21, scope: !160)
// CHECK:STDOUT: !170 = !DILocation(line: 36, column: 3, scope: !160)
// CHECK:STDOUT: !171 = !DILocation(line: 36, column: 21, scope: !160)
// CHECK:STDOUT: !173 = !DILocation(line: 38, column: 3, scope: !160)
// CHECK:STDOUT: !174 = !DILocation(line: 38, column: 19, scope: !160)
// CHECK:STDOUT: !176 = !DILocation(line: 39, column: 3, scope: !160)
// CHECK:STDOUT: !177 = !DILocation(line: 39, column: 21, scope: !160)
// CHECK:STDOUT: !179 = !DILocation(line: 40, column: 3, scope: !160)
// CHECK:STDOUT: !180 = !DILocation(line: 40, column: 21, scope: !160)
// CHECK:STDOUT: !182 = !DILocation(line: 41, column: 3, scope: !160)
// CHECK:STDOUT: !183 = !DILocation(line: 41, column: 21, scope: !160)
// CHECK:STDOUT: !185 = !DILocation(line: 43, column: 7, scope: !160)
// CHECK:STDOUT: !186 = !DILocation(line: 43, column: 14, scope: !160)
// CHECK:STDOUT: !187 = !DILocation(line: 43, column: 22, scope: !160)
// CHECK:STDOUT: !188 = !DILocation(line: 43, column: 30, scope: !160)
// CHECK:STDOUT: !189 = !DILocation(line: 43, column: 38, scope: !160)
// CHECK:STDOUT: !190 = !DILocation(line: 43, column: 45, scope: !160)
// CHECK:STDOUT: !191 = !DILocation(line: 43, column: 53, scope: !160)
// CHECK:STDOUT: !192 = !DILocation(line: 43, column: 61, scope: !160)
// CHECK:STDOUT: !193 = !DILocation(line: 43, column: 3, scope: !160)
// CHECK:STDOUT: !194 = !DILocation(line: 32, column: 1, scope: !160)
// CHECK:STDOUT: !195 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6e5a4ef51c9e705a:core.Destroy.Core", scope: null, file: !4, line: 41, type: !46, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !198)
// CHECK:STDOUT: !196 = !DILocalVariable(arg: 1, scope: !195, type: !13)
// CHECK:STDOUT: !197 = !DILocation(line: 41, column: 3, scope: !195)
// CHECK:STDOUT: !198 = !{!196}
// CHECK:STDOUT: !199 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.5aacfd7dcc330b17:core.Destroy.Core", scope: null, file: !4, line: 41, type: !46, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !202)
// CHECK:STDOUT: !200 = !DILocalVariable(arg: 1, scope: !199, type: !13)
// CHECK:STDOUT: !201 = !DILocation(line: 41, column: 3, scope: !199)
// CHECK:STDOUT: !202 = !{!200}
// CHECK:STDOUT: !203 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !4, line: 40, type: !48, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !206)
// CHECK:STDOUT: !204 = !DILocalVariable(arg: 1, scope: !203, type: !12)
// CHECK:STDOUT: !205 = !DILocation(line: 40, column: 3, scope: !203)
// CHECK:STDOUT: !206 = !{!204}
// CHECK:STDOUT: !207 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 40, type: !48, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !210)
// CHECK:STDOUT: !208 = !DILocalVariable(arg: 1, scope: !207, type: !12)
// CHECK:STDOUT: !209 = !DILocation(line: 40, column: 3, scope: !207)
// CHECK:STDOUT: !210 = !{!208}
// CHECK:STDOUT: !211 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.98b8c1354df43b20:core.Destroy.Core", scope: null, file: !4, line: 36, type: !50, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !214)
// CHECK:STDOUT: !212 = !DILocalVariable(arg: 1, scope: !211, type: !9)
// CHECK:STDOUT: !213 = !DILocation(line: 36, column: 3, scope: !211)
// CHECK:STDOUT: !214 = !{!212}
// CHECK:STDOUT: !215 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.5aacfd7dcc330b17:core.Destroy.Core", scope: null, file: !4, line: 41, type: !46, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !218)
// CHECK:STDOUT: !216 = !DILocalVariable(arg: 1, scope: !215, type: !13)
// CHECK:STDOUT: !217 = !DILocation(line: 41, column: 3, scope: !215)
// CHECK:STDOUT: !215 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.18a2a1ac0d16cf80:core.Destroy.Core", scope: null, file: !4, line: 36, type: !50, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !218)
// CHECK:STDOUT: !216 = !DILocalVariable(arg: 1, scope: !215, type: !9)
// CHECK:STDOUT: !217 = !DILocation(line: 36, column: 3, scope: !215)
// CHECK:STDOUT: !218 = !{!216}
// CHECK:STDOUT: !219 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.5aacfd7dcc330b17:core.Destroy.Core", scope: null, file: !4, line: 41, type: !46, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !222)
// CHECK:STDOUT: !220 = !DILocalVariable(arg: 1, scope: !219, type: !13)
// CHECK:STDOUT: !221 = !DILocation(line: 41, column: 3, scope: !219)
// CHECK:STDOUT: !219 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b18ca5df050aa3af:core.Destroy.Core", scope: null, file: !4, line: 35, type: !52, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !222)
// CHECK:STDOUT: !220 = !DILocalVariable(arg: 1, scope: !219, type: !8)
// CHECK:STDOUT: !221 = !DILocation(line: 35, column: 3, scope: !219)
// CHECK:STDOUT: !222 = !{!220}
// CHECK:STDOUT: !223 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !4, line: 40, type: !48, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !226)
// CHECK:STDOUT: !224 = !DILocalVariable(arg: 1, scope: !223, type: !12)
// CHECK:STDOUT: !225 = !DILocation(line: 40, column: 3, scope: !223)
// CHECK:STDOUT: !223 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.ea3ccedbd6a1c75d:core.Destroy.Core", scope: null, file: !4, line: 35, type: !52, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !226)
// CHECK:STDOUT: !224 = !DILocalVariable(arg: 1, scope: !223, type: !8)
// CHECK:STDOUT: !225 = !DILocation(line: 35, column: 3, scope: !223)
// CHECK:STDOUT: !226 = !{!224}
// CHECK:STDOUT: !227 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 40, type: !48, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !230)
// CHECK:STDOUT: !228 = !DILocalVariable(arg: 1, scope: !227, type: !12)
// CHECK:STDOUT: !229 = !DILocation(line: 40, column: 3, scope: !227)
// CHECK:STDOUT: !230 = !{!228}
// CHECK:STDOUT: !231 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 40, type: !48, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !234)
// CHECK:STDOUT: !232 = !DILocalVariable(arg: 1, scope: !231, type: !12)
// CHECK:STDOUT: !233 = !DILocation(line: 40, column: 3, scope: !231)
// CHECK:STDOUT: !234 = !{!232}
// CHECK:STDOUT: !235 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.98b8c1354df43b20:core.Destroy.Core", scope: null, file: !4, line: 36, type: !50, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !238)
// CHECK:STDOUT: !236 = !DILocalVariable(arg: 1, scope: !235, type: !9)
// CHECK:STDOUT: !237 = !DILocation(line: 36, column: 3, scope: !235)
// CHECK:STDOUT: !238 = !{!236}
// CHECK:STDOUT: !239 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.18a2a1ac0d16cf80:core.Destroy.Core", scope: null, file: !4, line: 36, type: !50, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !242)
// CHECK:STDOUT: !240 = !DILocalVariable(arg: 1, scope: !239, type: !9)
// CHECK:STDOUT: !241 = !DILocation(line: 36, column: 3, scope: !239)
// CHECK:STDOUT: !242 = !{!240}
// CHECK:STDOUT: !243 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.18a2a1ac0d16cf80:core.Destroy.Core", scope: null, file: !4, line: 36, type: !50, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !246)
// CHECK:STDOUT: !244 = !DILocalVariable(arg: 1, scope: !243, type: !9)
// CHECK:STDOUT: !245 = !DILocation(line: 36, column: 3, scope: !243)
// CHECK:STDOUT: !246 = !{!244}
// CHECK:STDOUT: !247 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b18ca5df050aa3af:core.Destroy.Core", scope: null, file: !4, line: 35, type: !52, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !250)
// CHECK:STDOUT: !248 = !DILocalVariable(arg: 1, scope: !247, type: !8)
// CHECK:STDOUT: !249 = !DILocation(line: 35, column: 3, scope: !247)
// CHECK:STDOUT: !250 = !{!248}
// CHECK:STDOUT: !251 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.ea3ccedbd6a1c75d:core.Destroy.Core", scope: null, file: !4, line: 35, type: !52, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !254)
// CHECK:STDOUT: !252 = !DILocalVariable(arg: 1, scope: !251, type: !8)
// CHECK:STDOUT: !253 = !DILocation(line: 35, column: 3, scope: !251)
// CHECK:STDOUT: !254 = !{!252}
// CHECK:STDOUT: !255 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.ea3ccedbd6a1c75d:core.Destroy.Core", scope: null, file: !4, line: 35, type: !52, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !258)
// CHECK:STDOUT: !256 = !DILocalVariable(arg: 1, scope: !255, type: !8)
// CHECK:STDOUT: !257 = !DILocation(line: 35, column: 3, scope: !255)
// CHECK:STDOUT: !258 = !{!256}
// CHECK:STDOUT: !259 = !{!"Simple C++ TBAA"}
// CHECK:STDOUT: !260 = !{!"omnipotent char", !259, i64 0}
// CHECK:STDOUT: !261 = !{!"any pointer", !260, i64 0}
// CHECK:STDOUT: !262 = !{!"p1 omnipotent char", !261, i64 0}
// CHECK:STDOUT: !263 = !{!262, !262, i64 0}
// CHECK:STDOUT: !264 = !{!260, !260, i64 0}
// CHECK:STDOUT: !265 = !{!"short", !260, i64 0}
// CHECK:STDOUT: !266 = !{!"p1 short", !261, i64 0}
// CHECK:STDOUT: !267 = !{!266, !266, i64 0}
// CHECK:STDOUT: !268 = !{!265, !265, i64 0}
// CHECK:STDOUT: !269 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !270 = !{i32 7, !"PIE Level", i32 2}
// CHECK:STDOUT: !271 = !{i32 7, !"uwtable", i32 2}
// CHECK:STDOUT: !272 = !{!"int", !260, i64 0}
// CHECK:STDOUT: !273 = !{!"__libc_errno", !272, i64 0}
// CHECK:STDOUT: !274 = !{!273, !272, i64 0}
// CHECK:STDOUT: !227 = !{!"Simple C++ TBAA"}
// CHECK:STDOUT: !228 = !{!"omnipotent char", !227, i64 0}
// CHECK:STDOUT: !229 = !{!"any pointer", !228, i64 0}
// CHECK:STDOUT: !230 = !{!"p1 omnipotent char", !229, i64 0}
// CHECK:STDOUT: !231 = !{!230, !230, i64 0}
// CHECK:STDOUT: !232 = !{!228, !228, i64 0}
// CHECK:STDOUT: !233 = !{!"short", !228, i64 0}
// CHECK:STDOUT: !234 = !{!"p1 short", !229, i64 0}
// CHECK:STDOUT: !235 = !{!234, !234, i64 0}
// CHECK:STDOUT: !236 = !{!233, !233, i64 0}
// CHECK:STDOUT: !237 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !238 = !{i32 7, !"PIE Level", i32 2}
// CHECK:STDOUT: !239 = !{i32 7, !"uwtable", i32 2}
// CHECK:STDOUT: !240 = !{!"int", !228, i64 0}
// CHECK:STDOUT: !241 = !{!"__libc_errno", !240, i64 0}
// CHECK:STDOUT: !242 = !{!241, !240, i64 0}
// CHECK:STDOUT:
// CHECK:STDOUT: ; ---
// CHECK:STDOUT: ; ModuleID = 'import_class.carbon'
@@ -727,50 +639,50 @@ fn Call(x: Cpp.D) -> Cpp.C {
// CHECK:STDOUT: %struct.X = type { ptr, ptr }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define void @_CGetX.Main(ptr sret([16 x i8]) %return) #0 !dbg !279 {
// CHECK:STDOUT: define void @_CGetX.Main(ptr sret([16 x i8]) %return) #0 !dbg !247 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: call void @_Z4Makev.carbon_thunk.(ptr %return), !dbg !282
// CHECK:STDOUT: ret void, !dbg !283
// CHECK:STDOUT: call void @_Z4Makev.carbon_thunk.(ptr %return), !dbg !250
// CHECK:STDOUT: ret void, !dbg !251
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable
// CHECK:STDOUT: define internal void @_Z4Makev.carbon_thunk.(ptr noundef %return) #1 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %return.addr = alloca ptr, align 8
// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !299
// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !299
// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !267
// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !267
// CHECK:STDOUT: call void @_Z4Makev(ptr dead_on_unwind writable sret(%struct.X) align 8 %0)
// CHECK:STDOUT: ret void
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define void @_CLet.Main() #0 !dbg !284 {
// CHECK:STDOUT: define void @_CLet.Main() #0 !dbg !252 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %.loc9_27.1.temp = alloca [16 x i8], align 8, !dbg !285
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc9_27.1.temp), !dbg !285
// CHECK:STDOUT: call void @_Z4Makev.carbon_thunk.(ptr %.loc9_27.1.temp), !dbg !285
// CHECK:STDOUT: call void @"_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core"(ptr %.loc9_27.1.temp), !dbg !285
// CHECK:STDOUT: ret void, !dbg !288
// CHECK:STDOUT: %.loc9_27.1.temp = alloca [16 x i8], align 8, !dbg !253
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc9_27.1.temp), !dbg !253
// CHECK:STDOUT: call void @_Z4Makev.carbon_thunk.(ptr %.loc9_27.1.temp), !dbg !253
// CHECK:STDOUT: call void @"_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core"(ptr %.loc9_27.1.temp), !dbg !253
// CHECK:STDOUT: ret void, !dbg !256
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: declare void @_ZN1XD1Ev(ptr noundef nonnull align 8 dead_on_return(16) dereferenceable(16)) unnamed_addr #2
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core"(ptr %self) #0 !dbg !289 {
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core"(ptr %self) #0 !dbg !257 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: call void @_ZN1XD1Ev(ptr %self), !dbg !291
// CHECK:STDOUT: ret void, !dbg !291
// CHECK:STDOUT: call void @_ZN1XD1Ev(ptr %self), !dbg !259
// CHECK:STDOUT: ret void, !dbg !259
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define void @_CVar.Main() #0 !dbg !293 {
// CHECK:STDOUT: define void @_CVar.Main() #0 !dbg !261 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %_.var = alloca [16 x i8], align 8, !dbg !294
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !294
// CHECK:STDOUT: call void @_Z4Makev.carbon_thunk.(ptr %_.var), !dbg !295
// CHECK:STDOUT: call void @"_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core"(ptr %_.var), !dbg !294
// CHECK:STDOUT: ret void, !dbg !297
// CHECK:STDOUT: %_.var = alloca [16 x i8], align 8, !dbg !262
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !262
// CHECK:STDOUT: call void @_Z4Makev.carbon_thunk.(ptr %_.var), !dbg !263
// CHECK:STDOUT: call void @"_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core"(ptr %_.var), !dbg !262
// CHECK:STDOUT: ret void, !dbg !265
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
@@ -787,9 +699,9 @@ fn Call(x: Cpp.D) -> Cpp.C {
// CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
// CHECK:STDOUT: attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
// CHECK:STDOUT:
// CHECK:STDOUT: !llvm.dbg.cu = !{!276}
// CHECK:STDOUT: !llvm.module.flags = !{!269, !270, !271, !2, !3}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!274}
// CHECK:STDOUT: !llvm.dbg.cu = !{!244}
// CHECK:STDOUT: !llvm.module.flags = !{!237, !238, !239, !2, !3}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!242}
// CHECK:STDOUT:
// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5}
// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3}
@@ -798,35 +710,35 @@ fn Call(x: Cpp.D) -> Cpp.C {
// CHECK:STDOUT: !18 = !DISubroutineType(types: !17)
// CHECK:STDOUT: !35 = !{null}
// CHECK:STDOUT: !36 = !DISubroutineType(types: !35)
// CHECK:STDOUT: !259 = !{!"Simple C++ TBAA"}
// CHECK:STDOUT: !260 = !{!"omnipotent char", !259, i64 0}
// CHECK:STDOUT: !261 = !{!"any pointer", !260, i64 0}
// CHECK:STDOUT: !269 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !270 = !{i32 7, !"PIE Level", i32 2}
// CHECK:STDOUT: !271 = !{i32 7, !"uwtable", i32 2}
// CHECK:STDOUT: !272 = !{!"int", !260, i64 0}
// CHECK:STDOUT: !273 = !{!"__libc_errno", !272, i64 0}
// CHECK:STDOUT: !274 = !{!273, !272, i64 0}
// CHECK:STDOUT: !275 = !DIFile(filename: "import_class.carbon", directory: "")
// CHECK:STDOUT: !276 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !275, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
// CHECK:STDOUT: !277 = !{!16}
// CHECK:STDOUT: !278 = !DISubroutineType(types: !277)
// CHECK:STDOUT: !279 = distinct !DISubprogram(name: "GetX", linkageName: "_CGetX.Main", scope: null, file: !275, line: 6, type: !278, spFlags: DISPFlagDefinition, unit: !276)
// CHECK:STDOUT: !282 = !DILocation(line: 6, column: 29, scope: !279)
// CHECK:STDOUT: !283 = !DILocation(line: 6, column: 22, scope: !279)
// CHECK:STDOUT: !284 = distinct !DISubprogram(name: "Let", linkageName: "_CLet.Main", scope: null, file: !275, line: 8, type: !36, spFlags: DISPFlagDefinition, unit: !276)
// CHECK:STDOUT: !285 = !DILocation(line: 9, column: 18, scope: !284)
// CHECK:STDOUT: !288 = !DILocation(line: 8, column: 1, scope: !284)
// CHECK:STDOUT: !289 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core", scope: null, file: !275, line: 9, type: !18, spFlags: DISPFlagDefinition, unit: !276, retainedNodes: !292)
// CHECK:STDOUT: !290 = !DILocalVariable(arg: 1, scope: !289, type: !16)
// CHECK:STDOUT: !291 = !DILocation(line: 9, column: 18, scope: !289)
// CHECK:STDOUT: !292 = !{!290}
// CHECK:STDOUT: !293 = distinct !DISubprogram(name: "Var", linkageName: "_CVar.Main", scope: null, file: !275, line: 12, type: !36, spFlags: DISPFlagDefinition, unit: !276)
// CHECK:STDOUT: !294 = !DILocation(line: 13, column: 3, scope: !293)
// CHECK:STDOUT: !295 = !DILocation(line: 13, column: 18, scope: !293)
// CHECK:STDOUT: !297 = !DILocation(line: 12, column: 1, scope: !293)
// CHECK:STDOUT: !298 = !{!"p1 _ZTS1X", !261, i64 0}
// CHECK:STDOUT: !299 = !{!298, !298, i64 0}
// CHECK:STDOUT: !227 = !{!"Simple C++ TBAA"}
// CHECK:STDOUT: !228 = !{!"omnipotent char", !227, i64 0}
// CHECK:STDOUT: !229 = !{!"any pointer", !228, i64 0}
// CHECK:STDOUT: !237 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !238 = !{i32 7, !"PIE Level", i32 2}
// CHECK:STDOUT: !239 = !{i32 7, !"uwtable", i32 2}
// CHECK:STDOUT: !240 = !{!"int", !228, i64 0}
// CHECK:STDOUT: !241 = !{!"__libc_errno", !240, i64 0}
// CHECK:STDOUT: !242 = !{!241, !240, i64 0}
// CHECK:STDOUT: !243 = !DIFile(filename: "import_class.carbon", directory: "")
// CHECK:STDOUT: !244 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !243, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
// CHECK:STDOUT: !245 = !{!16}
// CHECK:STDOUT: !246 = !DISubroutineType(types: !245)
// CHECK:STDOUT: !247 = distinct !DISubprogram(name: "GetX", linkageName: "_CGetX.Main", scope: null, file: !243, line: 6, type: !246, spFlags: DISPFlagDefinition, unit: !244)
// CHECK:STDOUT: !250 = !DILocation(line: 6, column: 29, scope: !247)
// CHECK:STDOUT: !251 = !DILocation(line: 6, column: 22, scope: !247)
// CHECK:STDOUT: !252 = distinct !DISubprogram(name: "Let", linkageName: "_CLet.Main", scope: null, file: !243, line: 8, type: !36, spFlags: DISPFlagDefinition, unit: !244)
// CHECK:STDOUT: !253 = !DILocation(line: 9, column: 18, scope: !252)
// CHECK:STDOUT: !256 = !DILocation(line: 8, column: 1, scope: !252)
// CHECK:STDOUT: !257 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core", scope: null, file: !243, line: 9, type: !18, spFlags: DISPFlagDefinition, unit: !244, retainedNodes: !260)
// CHECK:STDOUT: !258 = !DILocalVariable(arg: 1, scope: !257, type: !16)
// CHECK:STDOUT: !259 = !DILocation(line: 9, column: 18, scope: !257)
// CHECK:STDOUT: !260 = !{!258}
// CHECK:STDOUT: !261 = distinct !DISubprogram(name: "Var", linkageName: "_CVar.Main", scope: null, file: !243, line: 12, type: !36, spFlags: DISPFlagDefinition, unit: !244)
// CHECK:STDOUT: !262 = !DILocation(line: 13, column: 3, scope: !261)
// CHECK:STDOUT: !263 = !DILocation(line: 13, column: 18, scope: !261)
// CHECK:STDOUT: !265 = !DILocation(line: 12, column: 1, scope: !261)
// CHECK:STDOUT: !266 = !{!"p1 _ZTS1X", !229, i64 0}
// CHECK:STDOUT: !267 = !{!266, !266, i64 0}
// CHECK:STDOUT:
// CHECK:STDOUT: ; ---
// CHECK:STDOUT: ; ModuleID = 'indirect_return_with_args.carbon'
@@ -838,10 +750,10 @@ fn Call(x: Cpp.D) -> Cpp.C {
// CHECK:STDOUT: %class.C = type { i8 }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define void @_CCall.Main(ptr sret({}) %return, ptr %x) #0 !dbg !307 {
// CHECK:STDOUT: define void @_CCall.Main(ptr sret({}) %return, ptr %x) #0 !dbg !275 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: call void @_Z1f1D.carbon_thunk._(ptr %x, ptr %return), !dbg !313
// CHECK:STDOUT: ret void, !dbg !314
// CHECK:STDOUT: call void @_Z1f1D.carbon_thunk._(ptr %x, ptr %return), !dbg !281
// CHECK:STDOUT: ret void, !dbg !282
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable
@@ -851,10 +763,10 @@ fn Call(x: Cpp.D) -> Cpp.C {
// CHECK:STDOUT: %return.addr = alloca ptr, align 8
// CHECK:STDOUT: %agg.tmp = alloca %class.D, align 1
// CHECK:STDOUT: %undef.agg.tmp = alloca %class.C, align 1
// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !317
// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !319
// CHECK:STDOUT: %1 = load ptr, ptr %return.addr, align 8, !tbaa !319
// CHECK:STDOUT: %2 = load ptr, ptr %.addr, align 8, !tbaa !317
// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !285
// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !287
// CHECK:STDOUT: %1 = load ptr, ptr %return.addr, align 8, !tbaa !287
// CHECK:STDOUT: %2 = load ptr, ptr %.addr, align 8, !tbaa !285
// CHECK:STDOUT: call void @_Z1f1D()
// CHECK:STDOUT: ret void
// CHECK:STDOUT: }
@@ -865,33 +777,33 @@ fn Call(x: Cpp.D) -> Cpp.C {
// CHECK:STDOUT: attributes #1 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
// CHECK:STDOUT: attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
// CHECK:STDOUT:
// CHECK:STDOUT: !llvm.dbg.cu = !{!302}
// CHECK:STDOUT: !llvm.module.flags = !{!269, !270, !271, !2, !3}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!274}
// CHECK:STDOUT: !llvm.dbg.cu = !{!270}
// CHECK:STDOUT: !llvm.module.flags = !{!237, !238, !239, !2, !3}
// CHECK:STDOUT: !llvm.errno.tbaa = !{!242}
// CHECK:STDOUT:
// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5}
// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3}
// CHECK:STDOUT: !16 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64)
// CHECK:STDOUT: !259 = !{!"Simple C++ TBAA"}
// CHECK:STDOUT: !260 = !{!"omnipotent char", !259, i64 0}
// CHECK:STDOUT: !261 = !{!"any pointer", !260, i64 0}
// CHECK:STDOUT: !269 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !270 = !{i32 7, !"PIE Level", i32 2}
// CHECK:STDOUT: !271 = !{i32 7, !"uwtable", i32 2}
// CHECK:STDOUT: !272 = !{!"int", !260, i64 0}
// CHECK:STDOUT: !273 = !{!"__libc_errno", !272, i64 0}
// CHECK:STDOUT: !274 = !{!273, !272, i64 0}
// CHECK:STDOUT: !301 = !DIFile(filename: "indirect_return_with_args.carbon", directory: "")
// CHECK:STDOUT: !302 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !301, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
// CHECK:STDOUT: !303 = !{!16, !16}
// CHECK:STDOUT: !304 = !DISubroutineType(types: !303)
// CHECK:STDOUT: !307 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !301, line: 10, type: !304, spFlags: DISPFlagDefinition, unit: !302, retainedNodes: !315)
// CHECK:STDOUT: !308 = !DILocalVariable(arg: 1, scope: !307, type: !16)
// CHECK:STDOUT: !313 = !DILocation(line: 11, column: 10, scope: !307)
// CHECK:STDOUT: !314 = !DILocation(line: 11, column: 3, scope: !307)
// CHECK:STDOUT: !315 = !{!308}
// CHECK:STDOUT: !316 = !{!"p1 _ZTS1D", !261, i64 0}
// CHECK:STDOUT: !317 = !{!316, !316, i64 0}
// CHECK:STDOUT: !318 = !{!"p1 _ZTS1C", !261, i64 0}
// CHECK:STDOUT: !319 = !{!318, !318, i64 0}
// CHECK:STDOUT: !227 = !{!"Simple C++ TBAA"}
// CHECK:STDOUT: !228 = !{!"omnipotent char", !227, i64 0}
// CHECK:STDOUT: !229 = !{!"any pointer", !228, i64 0}
// CHECK:STDOUT: !237 = !{i32 8, !"PIC Level", i32 2}
// CHECK:STDOUT: !238 = !{i32 7, !"PIE Level", i32 2}
// CHECK:STDOUT: !239 = !{i32 7, !"uwtable", i32 2}
// CHECK:STDOUT: !240 = !{!"int", !228, i64 0}
// CHECK:STDOUT: !241 = !{!"__libc_errno", !240, i64 0}
// CHECK:STDOUT: !242 = !{!241, !240, i64 0}
// CHECK:STDOUT: !269 = !DIFile(filename: "indirect_return_with_args.carbon", directory: "")
// CHECK:STDOUT: !270 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !269, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
// CHECK:STDOUT: !271 = !{!16, !16}
// CHECK:STDOUT: !272 = !DISubroutineType(types: !271)
// CHECK:STDOUT: !275 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !269, line: 10, type: !272, spFlags: DISPFlagDefinition, unit: !270, retainedNodes: !283)
// CHECK:STDOUT: !276 = !DILocalVariable(arg: 1, scope: !275, type: !16)
// CHECK:STDOUT: !281 = !DILocation(line: 11, column: 10, scope: !275)
// CHECK:STDOUT: !282 = !DILocation(line: 11, column: 3, scope: !275)
// CHECK:STDOUT: !283 = !{!276}
// CHECK:STDOUT: !284 = !{!"p1 _ZTS1D", !229, i64 0}
// CHECK:STDOUT: !285 = !{!284, !284, i64 0}
// CHECK:STDOUT: !286 = !{!"p1 _ZTS1C", !229, i64 0}
// CHECK:STDOUT: !287 = !{!286, !286, i64 0}
// CHECK:STDOUT: