mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 11:51:04 +01:00
Classify classes with no struct fields as trivially destructible (#7846)
This commit is contained in:
+192
-214
@@ -173,8 +173,8 @@ fn GetRefs() {
|
||||
// CHECK:STDOUT: define internal void @_ZN1CC1Ev.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 !78
|
||||
// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !78
|
||||
// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !74
|
||||
// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !74
|
||||
// CHECK:STDOUT: ret void
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -191,8 +191,8 @@ fn GetRefs() {
|
||||
// CHECK:STDOUT: define internal void @_Z9TakeCRRefO1C.carbon_thunk.v(ptr noundef %0) #4 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %.addr = alloca ptr, align 8
|
||||
// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !78
|
||||
// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !78
|
||||
// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !74
|
||||
// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !74
|
||||
// CHECK:STDOUT: call void @_Z9TakeCRRefO1C(ptr noundef nonnull align 1 dereferenceable(1) %1)
|
||||
// CHECK:STDOUT: ret void
|
||||
// CHECK:STDOUT: }
|
||||
@@ -207,8 +207,8 @@ fn GetRefs() {
|
||||
// CHECK:STDOUT: define internal void @_Z13TakeConstCRefRK1C.carbon_thunk._(ptr noundef %0) #4 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %.addr = alloca ptr, align 8
|
||||
// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !78
|
||||
// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !78
|
||||
// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !74
|
||||
// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !74
|
||||
// CHECK:STDOUT: call void @_Z13TakeConstCRefRK1C(ptr noundef nonnull align 1 dereferenceable(1) %1)
|
||||
// CHECK:STDOUT: ret void
|
||||
// CHECK:STDOUT: }
|
||||
@@ -219,8 +219,8 @@ fn GetRefs() {
|
||||
// CHECK:STDOUT: define internal void @_Z11TakeIntRRefOi.carbon_thunk.v(ptr noundef %0) #4 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %.addr = alloca ptr, align 8
|
||||
// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !82
|
||||
// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !82
|
||||
// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !78
|
||||
// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !78
|
||||
// CHECK:STDOUT: call void @_Z11TakeIntRRefOi(ptr noundef nonnull align 4 dereferenceable(4) %1)
|
||||
// CHECK:STDOUT: ret void
|
||||
// CHECK:STDOUT: }
|
||||
@@ -232,24 +232,17 @@ fn GetRefs() {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !61 {
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !61 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !63
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !65 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !67
|
||||
// CHECK:STDOUT: ret void, !dbg !67
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable
|
||||
// CHECK:STDOUT: define internal void @_Z15TakeConstIntRefRKi.carbon_thunk._(ptr noundef %0) #4 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %.addr = alloca ptr, align 8
|
||||
// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !82
|
||||
// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !82
|
||||
// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !78
|
||||
// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !78
|
||||
// CHECK:STDOUT: call void @_Z15TakeConstIntRefRKi(ptr noundef nonnull align 4 dereferenceable(4) %1)
|
||||
// CHECK:STDOUT: ret void
|
||||
// CHECK:STDOUT: }
|
||||
@@ -258,9 +251,9 @@ fn GetRefs() {
|
||||
// CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #5
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define linkonce_odr void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.67b28f83c7cfd60c"(ptr sret({}) %return) #0 !dbg !69 {
|
||||
// CHECK:STDOUT: call void @"_COp:thunk:Default.dc3dd9c349162a91.Core:C.Cpp"(ptr %return), !dbg !72
|
||||
// CHECK:STDOUT: ret void, !dbg !73
|
||||
// CHECK:STDOUT: define linkonce_odr void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.67b28f83c7cfd60c"(ptr sret({}) %return) #0 !dbg !65 {
|
||||
// CHECK:STDOUT: call void @"_COp:thunk:Default.dc3dd9c349162a91.Core:C.Cpp"(ptr %return), !dbg !68
|
||||
// CHECK:STDOUT: ret void, !dbg !69
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
|
||||
@@ -287,8 +280,8 @@ fn GetRefs() {
|
||||
// CHECK:STDOUT: attributes #5 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !llvm.dbg.cu = !{!19}
|
||||
// CHECK:STDOUT: !llvm.module.flags = !{!83, !84, !85, !2, !3}
|
||||
// CHECK:STDOUT: !llvm.errno.tbaa = !{!87}
|
||||
// CHECK:STDOUT: !llvm.module.flags = !{!79, !80, !81, !2, !3}
|
||||
// CHECK:STDOUT: !llvm.errno.tbaa = !{!83}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5}
|
||||
// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3}
|
||||
@@ -328,30 +321,26 @@ fn GetRefs() {
|
||||
// CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !20)
|
||||
// CHECK:STDOUT: !59 = !DILocation(line: 12, column: 23, scope: !57)
|
||||
// CHECK:STDOUT: !60 = !{!58}
|
||||
// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 12, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !64)
|
||||
// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 12, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !64)
|
||||
// CHECK:STDOUT: !62 = !DILocalVariable(arg: 1, scope: !61, type: !20)
|
||||
// CHECK:STDOUT: !63 = !DILocation(line: 12, column: 23, scope: !61)
|
||||
// CHECK:STDOUT: !64 = !{!62}
|
||||
// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 12, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !68)
|
||||
// CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !65, type: !20)
|
||||
// CHECK:STDOUT: !67 = !DILocation(line: 12, column: 23, scope: !65)
|
||||
// CHECK:STDOUT: !68 = !{!66}
|
||||
// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.67b28f83c7cfd60c", scope: null, file: !12, line: 9, type: !27, spFlags: DISPFlagDefinition, unit: !19)
|
||||
// CHECK:STDOUT: !72 = !DILocation(line: 9, column: 28, scope: !69)
|
||||
// CHECK:STDOUT: !73 = !DILocation(line: 9, column: 21, scope: !69)
|
||||
// CHECK:STDOUT: !74 = !{!"Simple C++ TBAA"}
|
||||
// CHECK:STDOUT: !75 = !{!"omnipotent char", !74, i64 0}
|
||||
// CHECK:STDOUT: !76 = !{!"any pointer", !75, i64 0}
|
||||
// CHECK:STDOUT: !77 = !{!"p1 _ZTS1C", !76, i64 0}
|
||||
// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.67b28f83c7cfd60c", scope: null, file: !12, line: 9, type: !27, spFlags: DISPFlagDefinition, unit: !19)
|
||||
// CHECK:STDOUT: !68 = !DILocation(line: 9, column: 28, scope: !65)
|
||||
// CHECK:STDOUT: !69 = !DILocation(line: 9, column: 21, scope: !65)
|
||||
// CHECK:STDOUT: !70 = !{!"Simple C++ TBAA"}
|
||||
// CHECK:STDOUT: !71 = !{!"omnipotent char", !70, i64 0}
|
||||
// CHECK:STDOUT: !72 = !{!"any pointer", !71, i64 0}
|
||||
// CHECK:STDOUT: !73 = !{!"p1 _ZTS1C", !72, i64 0}
|
||||
// CHECK:STDOUT: !74 = !{!73, !73, i64 0}
|
||||
// CHECK:STDOUT: !76 = !{!"int", !71, i64 0}
|
||||
// CHECK:STDOUT: !77 = !{!"p1 int", !72, i64 0}
|
||||
// CHECK:STDOUT: !78 = !{!77, !77, i64 0}
|
||||
// CHECK:STDOUT: !80 = !{!"int", !75, i64 0}
|
||||
// CHECK:STDOUT: !81 = !{!"p1 int", !76, i64 0}
|
||||
// CHECK:STDOUT: !82 = !{!81, !81, i64 0}
|
||||
// CHECK:STDOUT: !83 = !{i32 8, !"PIC Level", i32 2}
|
||||
// CHECK:STDOUT: !84 = !{i32 7, !"PIE Level", i32 2}
|
||||
// CHECK:STDOUT: !85 = !{i32 7, !"uwtable", i32 2}
|
||||
// CHECK:STDOUT: !86 = !{!"__libc_errno", !80, i64 0}
|
||||
// CHECK:STDOUT: !87 = !{!86, !80, i64 0}
|
||||
// CHECK:STDOUT: !79 = !{i32 8, !"PIC Level", i32 2}
|
||||
// CHECK:STDOUT: !80 = !{i32 7, !"PIE Level", i32 2}
|
||||
// CHECK:STDOUT: !81 = !{i32 7, !"uwtable", i32 2}
|
||||
// CHECK:STDOUT: !82 = !{!"__libc_errno", !76, i64 0}
|
||||
// CHECK:STDOUT: !83 = !{!82, !76, i64 0}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; ---
|
||||
// CHECK:STDOUT: ; ModuleID = 'pass_references_via_thunk.carbon'
|
||||
@@ -365,51 +354,51 @@ fn GetRefs() {
|
||||
// CHECK:STDOUT: @C.val.loc20_20.3 = internal constant {} zeroinitializer
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define void @_CPassRefs.Main() #0 !dbg !90 {
|
||||
// CHECK:STDOUT: define void @_CPassRefs.Main() #0 !dbg !86 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !91
|
||||
// CHECK:STDOUT: %.loc20_18.2.temp = alloca {}, align 1, !dbg !96
|
||||
// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !100
|
||||
// CHECK:STDOUT: %_.var = alloca i32, align 4, !dbg !105
|
||||
// CHECK:STDOUT: %.loc26_23.2.temp = alloca i32, align 4, !dbg !107
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !91
|
||||
// CHECK:STDOUT: call void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.67b28f83c7cfd60c"(ptr %c.var), !dbg !91
|
||||
// CHECK:STDOUT: call void @_Z8TakeCRefR1C10ForceThunk.carbon_thunk.r(ptr %c.var), !dbg !95
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc20_18.2.temp), !dbg !96
|
||||
// CHECK:STDOUT: call void @_Z9TakeCRRefRK1C10ForceThunk.carbon_thunk._(ptr @C.val.loc20_20.3), !dbg !97
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.417eccf5eb8addbd:core.Destroy.Core"(ptr @C.val), !dbg !96
|
||||
// CHECK:STDOUT: call void @_Z13TakeConstCRefRK1C10ForceThunk.carbon_thunk._(ptr %c.var), !dbg !99
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !100
|
||||
// CHECK:STDOUT: store i32 poison, ptr %n.var, align 4, !dbg !100
|
||||
// CHECK:STDOUT: call void @_Z10TakeIntRefRi10ForceThunk.carbon_thunk.r(ptr %n.var), !dbg !104
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !105
|
||||
// CHECK:STDOUT: store i32 42, ptr %_.var, align 4, !dbg !105
|
||||
// CHECK:STDOUT: call void @_Z11TakeIntRRefOi10ForceThunk.carbon_thunk.v(ptr %_.var), !dbg !106
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %_.var), !dbg !105
|
||||
// CHECK:STDOUT: %.loc26_23.1 = load i32, ptr %n.var, align 4, !dbg !107
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc26_23.2.temp), !dbg !107
|
||||
// CHECK:STDOUT: store i32 %.loc26_23.1, ptr %.loc26_23.2.temp, align 4, !dbg !107
|
||||
// CHECK:STDOUT: call void @_Z15TakeConstIntRefRKi10ForceThunk.carbon_thunk._(ptr %.loc26_23.2.temp), !dbg !108
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc26_23.2.temp), !dbg !107
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %n.var), !dbg !100
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.417eccf5eb8addbd:core.Destroy.Core"(ptr %c.var), !dbg !91
|
||||
// CHECK:STDOUT: ret void, !dbg !109
|
||||
// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !87
|
||||
// CHECK:STDOUT: %.loc20_18.2.temp = alloca {}, align 1, !dbg !92
|
||||
// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !96
|
||||
// CHECK:STDOUT: %_.var = alloca i32, align 4, !dbg !101
|
||||
// CHECK:STDOUT: %.loc26_23.2.temp = alloca i32, align 4, !dbg !103
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !87
|
||||
// CHECK:STDOUT: call void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.67b28f83c7cfd60c"(ptr %c.var), !dbg !87
|
||||
// CHECK:STDOUT: call void @_Z8TakeCRefR1C10ForceThunk.carbon_thunk.r(ptr %c.var), !dbg !91
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc20_18.2.temp), !dbg !92
|
||||
// CHECK:STDOUT: call void @_Z9TakeCRRefRK1C10ForceThunk.carbon_thunk._(ptr @C.val.loc20_20.3), !dbg !93
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.417eccf5eb8addbd:core.Destroy.Core"(ptr @C.val), !dbg !92
|
||||
// CHECK:STDOUT: call void @_Z13TakeConstCRefRK1C10ForceThunk.carbon_thunk._(ptr %c.var), !dbg !95
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !96
|
||||
// CHECK:STDOUT: store i32 poison, ptr %n.var, align 4, !dbg !96
|
||||
// CHECK:STDOUT: call void @_Z10TakeIntRefRi10ForceThunk.carbon_thunk.r(ptr %n.var), !dbg !100
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !101
|
||||
// CHECK:STDOUT: store i32 42, ptr %_.var, align 4, !dbg !101
|
||||
// CHECK:STDOUT: call void @_Z11TakeIntRRefOi10ForceThunk.carbon_thunk.v(ptr %_.var), !dbg !102
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %_.var), !dbg !101
|
||||
// CHECK:STDOUT: %.loc26_23.1 = load i32, ptr %n.var, align 4, !dbg !103
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc26_23.2.temp), !dbg !103
|
||||
// CHECK:STDOUT: store i32 %.loc26_23.1, ptr %.loc26_23.2.temp, align 4, !dbg !103
|
||||
// CHECK:STDOUT: call void @_Z15TakeConstIntRefRKi10ForceThunk.carbon_thunk._(ptr %.loc26_23.2.temp), !dbg !104
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc26_23.2.temp), !dbg !103
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %n.var), !dbg !96
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.417eccf5eb8addbd:core.Destroy.Core"(ptr %c.var), !dbg !87
|
||||
// CHECK:STDOUT: ret void, !dbg !105
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress nounwind uwtable
|
||||
// CHECK:STDOUT: define internal void @_ZN1CC1Ev.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 !78
|
||||
// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !78
|
||||
// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !74
|
||||
// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !74
|
||||
// CHECK:STDOUT: ret void
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Default.dc3dd9c349162a91.Core:C.Cpp"(ptr sret({}) %return) #2 !dbg !110 {
|
||||
// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Default.dc3dd9c349162a91.Core:C.Cpp"(ptr sret({}) %return) #2 !dbg !106 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: call void @_ZN1CC1Ev.carbon_thunk.(ptr %return), !dbg !112
|
||||
// CHECK:STDOUT: ret void, !dbg !112
|
||||
// CHECK:STDOUT: call void @_ZN1CC1Ev.carbon_thunk.(ptr %return), !dbg !108
|
||||
// CHECK:STDOUT: ret void, !dbg !108
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable
|
||||
@@ -417,8 +406,8 @@ fn GetRefs() {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %.addr = alloca ptr, align 8
|
||||
// CHECK:STDOUT: %agg.tmp = alloca %class.ForceThunk, align 1
|
||||
// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !78
|
||||
// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !78, !nonnull !134
|
||||
// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !74
|
||||
// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !74, !nonnull !126
|
||||
// CHECK:STDOUT: call void @_Z8TakeCRefR1C10ForceThunk(ptr noundef nonnull align 1 dereferenceable(1) %1)
|
||||
// CHECK:STDOUT: ret void
|
||||
// CHECK:STDOUT: }
|
||||
@@ -428,16 +417,16 @@ fn GetRefs() {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %.addr = alloca ptr, align 8
|
||||
// CHECK:STDOUT: %agg.tmp = alloca %class.ForceThunk, align 1
|
||||
// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !78
|
||||
// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !78
|
||||
// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !74
|
||||
// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !74
|
||||
// CHECK:STDOUT: call void @_Z9TakeCRRefRK1C10ForceThunk(ptr noundef nonnull align 1 dereferenceable(1) %1)
|
||||
// CHECK:STDOUT: ret void
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.417eccf5eb8addbd:core.Destroy.Core"(ptr %self) #0 !dbg !113 {
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.417eccf5eb8addbd:core.Destroy.Core"(ptr %self) #0 !dbg !109 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !115
|
||||
// CHECK:STDOUT: ret void, !dbg !111
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable
|
||||
@@ -445,8 +434,8 @@ fn GetRefs() {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %.addr = alloca ptr, align 8
|
||||
// CHECK:STDOUT: %agg.tmp = alloca %class.ForceThunk, align 1
|
||||
// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !78
|
||||
// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !78
|
||||
// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !74
|
||||
// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !74
|
||||
// CHECK:STDOUT: call void @_Z13TakeConstCRefRK1C10ForceThunk(ptr noundef nonnull align 1 dereferenceable(1) %1)
|
||||
// CHECK:STDOUT: ret void
|
||||
// CHECK:STDOUT: }
|
||||
@@ -456,8 +445,8 @@ fn GetRefs() {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %.addr = alloca ptr, align 8
|
||||
// CHECK:STDOUT: %agg.tmp = alloca %class.ForceThunk, align 1
|
||||
// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !82
|
||||
// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !82, !nonnull !134, !align !136
|
||||
// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !78
|
||||
// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !78, !nonnull !126, !align !128
|
||||
// CHECK:STDOUT: call void @_Z10TakeIntRefRi10ForceThunk(ptr noundef nonnull align 4 dereferenceable(4) %1)
|
||||
// CHECK:STDOUT: ret void
|
||||
// CHECK:STDOUT: }
|
||||
@@ -467,38 +456,31 @@ fn GetRefs() {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %.addr = alloca ptr, align 8
|
||||
// CHECK:STDOUT: %agg.tmp = alloca %class.ForceThunk, align 1
|
||||
// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !82
|
||||
// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !82
|
||||
// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !78
|
||||
// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !78
|
||||
// CHECK:STDOUT: call void @_Z11TakeIntRRefOi10ForceThunk(ptr noundef nonnull align 4 dereferenceable(4) %1)
|
||||
// CHECK:STDOUT: ret void
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !117 {
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !113 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !115
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !117 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !119
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !121 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !123
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !125 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !127
|
||||
// CHECK:STDOUT: ret void, !dbg !127
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable
|
||||
// CHECK:STDOUT: define internal void @_Z15TakeConstIntRefRKi10ForceThunk.carbon_thunk._(ptr noundef %0) #3 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %.addr = alloca ptr, align 8
|
||||
// CHECK:STDOUT: %agg.tmp = alloca %class.ForceThunk, align 1
|
||||
// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !82
|
||||
// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !82
|
||||
// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !78
|
||||
// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !78
|
||||
// CHECK:STDOUT: call void @_Z15TakeConstIntRefRKi10ForceThunk(ptr noundef nonnull align 4 dereferenceable(4) %1)
|
||||
// CHECK:STDOUT: ret void
|
||||
// CHECK:STDOUT: }
|
||||
@@ -507,9 +489,9 @@ fn GetRefs() {
|
||||
// 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.67b28f83c7cfd60c"(ptr sret({}) %return) #0 !dbg !129 {
|
||||
// CHECK:STDOUT: call void @"_COp:thunk:Default.dc3dd9c349162a91.Core:C.Cpp"(ptr %return), !dbg !132
|
||||
// CHECK:STDOUT: ret void, !dbg !133
|
||||
// CHECK:STDOUT: define linkonce_odr void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.67b28f83c7cfd60c"(ptr sret({}) %return) #0 !dbg !121 {
|
||||
// CHECK:STDOUT: call void @"_COp:thunk:Default.dc3dd9c349162a91.Core:C.Cpp"(ptr %return), !dbg !124
|
||||
// CHECK:STDOUT: ret void, !dbg !125
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: declare void @_Z8TakeCRefR1C10ForceThunk(ptr noundef nonnull align 1 dereferenceable(1)) #5
|
||||
@@ -536,9 +518,9 @@ fn GetRefs() {
|
||||
// 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 = !{!89}
|
||||
// CHECK:STDOUT: !llvm.module.flags = !{!83, !84, !85, !2, !3}
|
||||
// CHECK:STDOUT: !llvm.errno.tbaa = !{!87}
|
||||
// CHECK:STDOUT: !llvm.dbg.cu = !{!85}
|
||||
// CHECK:STDOUT: !llvm.module.flags = !{!79, !80, !81, !2, !3}
|
||||
// CHECK:STDOUT: !llvm.errno.tbaa = !{!83}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5}
|
||||
// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3}
|
||||
@@ -553,57 +535,53 @@ fn GetRefs() {
|
||||
// CHECK:STDOUT: !27 = !DISubroutineType(types: !26)
|
||||
// CHECK:STDOUT: !28 = !{null, !20}
|
||||
// CHECK:STDOUT: !29 = !DISubroutineType(types: !28)
|
||||
// CHECK:STDOUT: !74 = !{!"Simple C++ TBAA"}
|
||||
// CHECK:STDOUT: !75 = !{!"omnipotent char", !74, i64 0}
|
||||
// CHECK:STDOUT: !76 = !{!"any pointer", !75, i64 0}
|
||||
// CHECK:STDOUT: !77 = !{!"p1 _ZTS1C", !76, i64 0}
|
||||
// CHECK:STDOUT: !70 = !{!"Simple C++ TBAA"}
|
||||
// CHECK:STDOUT: !71 = !{!"omnipotent char", !70, i64 0}
|
||||
// CHECK:STDOUT: !72 = !{!"any pointer", !71, i64 0}
|
||||
// CHECK:STDOUT: !73 = !{!"p1 _ZTS1C", !72, i64 0}
|
||||
// CHECK:STDOUT: !74 = !{!73, !73, i64 0}
|
||||
// CHECK:STDOUT: !76 = !{!"int", !71, i64 0}
|
||||
// CHECK:STDOUT: !77 = !{!"p1 int", !72, i64 0}
|
||||
// CHECK:STDOUT: !78 = !{!77, !77, i64 0}
|
||||
// CHECK:STDOUT: !80 = !{!"int", !75, i64 0}
|
||||
// CHECK:STDOUT: !81 = !{!"p1 int", !76, i64 0}
|
||||
// CHECK:STDOUT: !82 = !{!81, !81, i64 0}
|
||||
// CHECK:STDOUT: !83 = !{i32 8, !"PIC Level", i32 2}
|
||||
// CHECK:STDOUT: !84 = !{i32 7, !"PIE Level", i32 2}
|
||||
// CHECK:STDOUT: !85 = !{i32 7, !"uwtable", i32 2}
|
||||
// CHECK:STDOUT: !86 = !{!"__libc_errno", !80, i64 0}
|
||||
// CHECK:STDOUT: !87 = !{!86, !80, i64 0}
|
||||
// CHECK:STDOUT: !88 = !DIFile(filename: "pass_references_via_thunk.carbon", directory: "")
|
||||
// CHECK:STDOUT: !89 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !88, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
|
||||
// CHECK:STDOUT: !90 = distinct !DISubprogram(name: "PassRefs", linkageName: "_CPassRefs.Main", scope: null, file: !88, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !89)
|
||||
// CHECK:STDOUT: !91 = !DILocation(line: 18, column: 3, scope: !90)
|
||||
// CHECK:STDOUT: !95 = !DILocation(line: 19, column: 3, scope: !90)
|
||||
// CHECK:STDOUT: !96 = !DILocation(line: 20, column: 17, scope: !90)
|
||||
// CHECK:STDOUT: !97 = !DILocation(line: 20, column: 3, scope: !90)
|
||||
// CHECK:STDOUT: !99 = !DILocation(line: 21, column: 3, scope: !90)
|
||||
// CHECK:STDOUT: !100 = !DILocation(line: 23, column: 3, scope: !90)
|
||||
// CHECK:STDOUT: !104 = !DILocation(line: 24, column: 3, scope: !90)
|
||||
// CHECK:STDOUT: !105 = !DILocation(line: 13, column: 23, scope: !90)
|
||||
// CHECK:STDOUT: !106 = !DILocation(line: 25, column: 3, scope: !90)
|
||||
// CHECK:STDOUT: !107 = !DILocation(line: 26, column: 23, scope: !90)
|
||||
// CHECK:STDOUT: !108 = !DILocation(line: 26, column: 3, scope: !90)
|
||||
// CHECK:STDOUT: !109 = !DILocation(line: 17, column: 1, scope: !90)
|
||||
// CHECK:STDOUT: !110 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.dc3dd9c349162a91.Core:C.Cpp", scope: null, file: !88, line: 5, type: !27, spFlags: DISPFlagDefinition, unit: !89)
|
||||
// CHECK:STDOUT: !112 = !DILocation(line: 5, column: 7, scope: !110)
|
||||
// CHECK:STDOUT: !113 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.417eccf5eb8addbd:core.Destroy.Core", scope: null, file: !88, line: 20, type: !25, spFlags: DISPFlagDefinition, unit: !89, retainedNodes: !116)
|
||||
// CHECK:STDOUT: !114 = !DILocalVariable(arg: 1, scope: !113, type: !23)
|
||||
// CHECK:STDOUT: !115 = !DILocation(line: 20, column: 17, scope: !113)
|
||||
// CHECK:STDOUT: !79 = !{i32 8, !"PIC Level", i32 2}
|
||||
// CHECK:STDOUT: !80 = !{i32 7, !"PIE Level", i32 2}
|
||||
// CHECK:STDOUT: !81 = !{i32 7, !"uwtable", i32 2}
|
||||
// CHECK:STDOUT: !82 = !{!"__libc_errno", !76, i64 0}
|
||||
// CHECK:STDOUT: !83 = !{!82, !76, i64 0}
|
||||
// CHECK:STDOUT: !84 = !DIFile(filename: "pass_references_via_thunk.carbon", directory: "")
|
||||
// CHECK:STDOUT: !85 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !84, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
|
||||
// CHECK:STDOUT: !86 = distinct !DISubprogram(name: "PassRefs", linkageName: "_CPassRefs.Main", scope: null, file: !84, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !85)
|
||||
// CHECK:STDOUT: !87 = !DILocation(line: 18, column: 3, scope: !86)
|
||||
// CHECK:STDOUT: !91 = !DILocation(line: 19, column: 3, scope: !86)
|
||||
// CHECK:STDOUT: !92 = !DILocation(line: 20, column: 17, scope: !86)
|
||||
// CHECK:STDOUT: !93 = !DILocation(line: 20, column: 3, scope: !86)
|
||||
// CHECK:STDOUT: !95 = !DILocation(line: 21, column: 3, scope: !86)
|
||||
// CHECK:STDOUT: !96 = !DILocation(line: 23, column: 3, scope: !86)
|
||||
// CHECK:STDOUT: !100 = !DILocation(line: 24, column: 3, scope: !86)
|
||||
// CHECK:STDOUT: !101 = !DILocation(line: 13, column: 23, scope: !86)
|
||||
// CHECK:STDOUT: !102 = !DILocation(line: 25, column: 3, scope: !86)
|
||||
// CHECK:STDOUT: !103 = !DILocation(line: 26, column: 23, scope: !86)
|
||||
// CHECK:STDOUT: !104 = !DILocation(line: 26, column: 3, scope: !86)
|
||||
// CHECK:STDOUT: !105 = !DILocation(line: 17, column: 1, scope: !86)
|
||||
// CHECK:STDOUT: !106 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.dc3dd9c349162a91.Core:C.Cpp", scope: null, file: !84, line: 5, type: !27, spFlags: DISPFlagDefinition, unit: !85)
|
||||
// CHECK:STDOUT: !108 = !DILocation(line: 5, column: 7, scope: !106)
|
||||
// CHECK:STDOUT: !109 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.417eccf5eb8addbd:core.Destroy.Core", scope: null, file: !84, line: 20, type: !25, spFlags: DISPFlagDefinition, unit: !85, retainedNodes: !112)
|
||||
// CHECK:STDOUT: !110 = !DILocalVariable(arg: 1, scope: !109, type: !23)
|
||||
// CHECK:STDOUT: !111 = !DILocation(line: 20, column: 17, scope: !109)
|
||||
// CHECK:STDOUT: !112 = !{!110}
|
||||
// CHECK:STDOUT: !113 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !84, line: 13, type: !29, spFlags: DISPFlagDefinition, unit: !85, retainedNodes: !116)
|
||||
// CHECK:STDOUT: !114 = !DILocalVariable(arg: 1, scope: !113, type: !20)
|
||||
// CHECK:STDOUT: !115 = !DILocation(line: 13, column: 23, scope: !113)
|
||||
// CHECK:STDOUT: !116 = !{!114}
|
||||
// CHECK:STDOUT: !117 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !88, line: 13, type: !29, spFlags: DISPFlagDefinition, unit: !89, retainedNodes: !120)
|
||||
// CHECK:STDOUT: !117 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !84, line: 13, type: !29, spFlags: DISPFlagDefinition, unit: !85, retainedNodes: !120)
|
||||
// CHECK:STDOUT: !118 = !DILocalVariable(arg: 1, scope: !117, type: !20)
|
||||
// CHECK:STDOUT: !119 = !DILocation(line: 13, column: 23, scope: !117)
|
||||
// CHECK:STDOUT: !120 = !{!118}
|
||||
// CHECK:STDOUT: !121 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !88, line: 13, type: !29, spFlags: DISPFlagDefinition, unit: !89, retainedNodes: !124)
|
||||
// CHECK:STDOUT: !122 = !DILocalVariable(arg: 1, scope: !121, type: !20)
|
||||
// CHECK:STDOUT: !123 = !DILocation(line: 13, column: 23, scope: !121)
|
||||
// CHECK:STDOUT: !124 = !{!122}
|
||||
// CHECK:STDOUT: !125 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !88, line: 13, type: !29, spFlags: DISPFlagDefinition, unit: !89, retainedNodes: !128)
|
||||
// CHECK:STDOUT: !126 = !DILocalVariable(arg: 1, scope: !125, type: !20)
|
||||
// CHECK:STDOUT: !127 = !DILocation(line: 13, column: 23, scope: !125)
|
||||
// CHECK:STDOUT: !128 = !{!126}
|
||||
// CHECK:STDOUT: !129 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.67b28f83c7cfd60c", scope: null, file: !12, line: 9, type: !27, spFlags: DISPFlagDefinition, unit: !89)
|
||||
// CHECK:STDOUT: !132 = !DILocation(line: 9, column: 28, scope: !129)
|
||||
// CHECK:STDOUT: !133 = !DILocation(line: 9, column: 21, scope: !129)
|
||||
// CHECK:STDOUT: !134 = !{}
|
||||
// CHECK:STDOUT: !136 = !{i64 4}
|
||||
// CHECK:STDOUT: !121 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.67b28f83c7cfd60c", scope: null, file: !12, line: 9, type: !27, spFlags: DISPFlagDefinition, unit: !85)
|
||||
// CHECK:STDOUT: !124 = !DILocation(line: 9, column: 28, scope: !121)
|
||||
// CHECK:STDOUT: !125 = !DILocation(line: 9, column: 21, scope: !121)
|
||||
// CHECK:STDOUT: !126 = !{}
|
||||
// CHECK:STDOUT: !128 = !{i64 4}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; ---
|
||||
// CHECK:STDOUT: ; ModuleID = 'return_references.carbon'
|
||||
@@ -612,15 +590,15 @@ fn GetRefs() {
|
||||
// CHECK:STDOUT: target triple = "x86_64-unknown-linux-gnu"
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define void @_CGetRefs.Main() #0 !dbg !139 {
|
||||
// CHECK:STDOUT: define void @_CGetRefs.Main() #0 !dbg !131 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %ReturnCRef.call = call ptr @_Z10ReturnCRefv(), !dbg !140
|
||||
// CHECK:STDOUT: %ReturnCRRef.call = call ptr @_Z11ReturnCRRefv(), !dbg !143
|
||||
// CHECK:STDOUT: %ReturnConstCRef.call = call ptr @_Z15ReturnConstCRefv(), !dbg !146
|
||||
// CHECK:STDOUT: %ReturnIntRef.call = call ptr @_Z12ReturnIntRefv(), !dbg !149
|
||||
// CHECK:STDOUT: %ReturnIntRRef.call = call ptr @_Z13ReturnIntRRefv(), !dbg !152
|
||||
// CHECK:STDOUT: %ReturnConstIntRef.call = call ptr @_Z17ReturnConstIntRefv(), !dbg !155
|
||||
// CHECK:STDOUT: ret void, !dbg !158
|
||||
// CHECK:STDOUT: %ReturnCRef.call = call ptr @_Z10ReturnCRefv(), !dbg !132
|
||||
// CHECK:STDOUT: %ReturnCRRef.call = call ptr @_Z11ReturnCRRefv(), !dbg !135
|
||||
// CHECK:STDOUT: %ReturnConstCRef.call = call ptr @_Z15ReturnConstCRefv(), !dbg !138
|
||||
// CHECK:STDOUT: %ReturnIntRef.call = call ptr @_Z12ReturnIntRefv(), !dbg !141
|
||||
// CHECK:STDOUT: %ReturnIntRRef.call = call ptr @_Z13ReturnIntRRefv(), !dbg !144
|
||||
// CHECK:STDOUT: %ReturnConstIntRef.call = call ptr @_Z17ReturnConstIntRefv(), !dbg !147
|
||||
// CHECK:STDOUT: ret void, !dbg !150
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: declare noundef nonnull align 1 dereferenceable(1) ptr @_Z10ReturnCRefv() #1
|
||||
@@ -638,32 +616,32 @@ fn GetRefs() {
|
||||
// CHECK:STDOUT: attributes #0 = { nounwind }
|
||||
// CHECK:STDOUT: attributes #1 = { "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 = !{!138}
|
||||
// CHECK:STDOUT: !llvm.module.flags = !{!83, !84, !85, !2, !3}
|
||||
// CHECK:STDOUT: !llvm.errno.tbaa = !{!87}
|
||||
// CHECK:STDOUT: !llvm.dbg.cu = !{!130}
|
||||
// CHECK:STDOUT: !llvm.module.flags = !{!79, !80, !81, !2, !3}
|
||||
// CHECK:STDOUT: !llvm.errno.tbaa = !{!83}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5}
|
||||
// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3}
|
||||
// CHECK:STDOUT: !21 = !{null}
|
||||
// CHECK:STDOUT: !22 = !DISubroutineType(types: !21)
|
||||
// CHECK:STDOUT: !74 = !{!"Simple C++ TBAA"}
|
||||
// CHECK:STDOUT: !75 = !{!"omnipotent char", !74, i64 0}
|
||||
// CHECK:STDOUT: !80 = !{!"int", !75, i64 0}
|
||||
// CHECK:STDOUT: !83 = !{i32 8, !"PIC Level", i32 2}
|
||||
// CHECK:STDOUT: !84 = !{i32 7, !"PIE Level", i32 2}
|
||||
// CHECK:STDOUT: !85 = !{i32 7, !"uwtable", i32 2}
|
||||
// CHECK:STDOUT: !86 = !{!"__libc_errno", !80, i64 0}
|
||||
// CHECK:STDOUT: !87 = !{!86, !80, i64 0}
|
||||
// CHECK:STDOUT: !137 = !DIFile(filename: "return_references.carbon", directory: "")
|
||||
// CHECK:STDOUT: !138 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !137, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
|
||||
// CHECK:STDOUT: !139 = distinct !DISubprogram(name: "GetRefs", linkageName: "_CGetRefs.Main", scope: null, file: !137, line: 16, type: !22, spFlags: DISPFlagDefinition, unit: !138)
|
||||
// CHECK:STDOUT: !140 = !DILocation(line: 17, column: 22, scope: !139)
|
||||
// CHECK:STDOUT: !143 = !DILocation(line: 18, column: 22, scope: !139)
|
||||
// CHECK:STDOUT: !146 = !DILocation(line: 19, column: 28, scope: !139)
|
||||
// CHECK:STDOUT: !149 = !DILocation(line: 21, column: 20, scope: !139)
|
||||
// CHECK:STDOUT: !152 = !DILocation(line: 22, column: 20, scope: !139)
|
||||
// CHECK:STDOUT: !155 = !DILocation(line: 23, column: 26, scope: !139)
|
||||
// CHECK:STDOUT: !158 = !DILocation(line: 16, column: 1, scope: !139)
|
||||
// CHECK:STDOUT: !70 = !{!"Simple C++ TBAA"}
|
||||
// CHECK:STDOUT: !71 = !{!"omnipotent char", !70, i64 0}
|
||||
// CHECK:STDOUT: !76 = !{!"int", !71, i64 0}
|
||||
// CHECK:STDOUT: !79 = !{i32 8, !"PIC Level", i32 2}
|
||||
// CHECK:STDOUT: !80 = !{i32 7, !"PIE Level", i32 2}
|
||||
// CHECK:STDOUT: !81 = !{i32 7, !"uwtable", i32 2}
|
||||
// CHECK:STDOUT: !82 = !{!"__libc_errno", !76, i64 0}
|
||||
// CHECK:STDOUT: !83 = !{!82, !76, i64 0}
|
||||
// CHECK:STDOUT: !129 = !DIFile(filename: "return_references.carbon", directory: "")
|
||||
// CHECK:STDOUT: !130 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !129, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
|
||||
// CHECK:STDOUT: !131 = distinct !DISubprogram(name: "GetRefs", linkageName: "_CGetRefs.Main", scope: null, file: !129, line: 16, type: !22, spFlags: DISPFlagDefinition, unit: !130)
|
||||
// CHECK:STDOUT: !132 = !DILocation(line: 17, column: 22, scope: !131)
|
||||
// CHECK:STDOUT: !135 = !DILocation(line: 18, column: 22, scope: !131)
|
||||
// CHECK:STDOUT: !138 = !DILocation(line: 19, column: 28, scope: !131)
|
||||
// CHECK:STDOUT: !141 = !DILocation(line: 21, column: 20, scope: !131)
|
||||
// CHECK:STDOUT: !144 = !DILocation(line: 22, column: 20, scope: !131)
|
||||
// CHECK:STDOUT: !147 = !DILocation(line: 23, column: 26, scope: !131)
|
||||
// CHECK:STDOUT: !150 = !DILocation(line: 16, column: 1, scope: !131)
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; ---
|
||||
// CHECK:STDOUT: ; ModuleID = 'return_references_via_thunk.carbon'
|
||||
@@ -674,15 +652,15 @@ fn GetRefs() {
|
||||
// CHECK:STDOUT: %class.ForceThunk.23 = type { i8 }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define void @_CGetRefs.Main() #0 !dbg !161 {
|
||||
// CHECK:STDOUT: define void @_CGetRefs.Main() #0 !dbg !153 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %ReturnCRef__carbon_thunk.call = call ptr @_Z10ReturnCRef10ForceThunk.carbon_thunk.(), !dbg !162
|
||||
// CHECK:STDOUT: %ReturnCRRef__carbon_thunk.call = call ptr @_Z11ReturnCRRef10ForceThunk.carbon_thunk.(), !dbg !165
|
||||
// CHECK:STDOUT: %ReturnConstCRef__carbon_thunk.call = call ptr @_Z15ReturnConstCRef10ForceThunk.carbon_thunk.(), !dbg !168
|
||||
// CHECK:STDOUT: %ReturnIntRef__carbon_thunk.call = call ptr @_Z12ReturnIntRef10ForceThunk.carbon_thunk.(), !dbg !171
|
||||
// CHECK:STDOUT: %ReturnIntRRef__carbon_thunk.call = call ptr @_Z13ReturnIntRRef10ForceThunk.carbon_thunk.(), !dbg !174
|
||||
// CHECK:STDOUT: %ReturnConstIntRef__carbon_thunk.call = call ptr @_Z17ReturnConstIntRef10ForceThunk.carbon_thunk.(), !dbg !177
|
||||
// CHECK:STDOUT: ret void, !dbg !180
|
||||
// CHECK:STDOUT: %ReturnCRef__carbon_thunk.call = call ptr @_Z10ReturnCRef10ForceThunk.carbon_thunk.(), !dbg !154
|
||||
// CHECK:STDOUT: %ReturnCRRef__carbon_thunk.call = call ptr @_Z11ReturnCRRef10ForceThunk.carbon_thunk.(), !dbg !157
|
||||
// CHECK:STDOUT: %ReturnConstCRef__carbon_thunk.call = call ptr @_Z15ReturnConstCRef10ForceThunk.carbon_thunk.(), !dbg !160
|
||||
// CHECK:STDOUT: %ReturnIntRef__carbon_thunk.call = call ptr @_Z12ReturnIntRef10ForceThunk.carbon_thunk.(), !dbg !163
|
||||
// CHECK:STDOUT: %ReturnIntRRef__carbon_thunk.call = call ptr @_Z13ReturnIntRRef10ForceThunk.carbon_thunk.(), !dbg !166
|
||||
// CHECK:STDOUT: %ReturnConstIntRef__carbon_thunk.call = call ptr @_Z17ReturnConstIntRef10ForceThunk.carbon_thunk.(), !dbg !169
|
||||
// CHECK:STDOUT: ret void, !dbg !172
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable
|
||||
@@ -749,30 +727,30 @@ fn GetRefs() {
|
||||
// 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 = !{!160}
|
||||
// CHECK:STDOUT: !llvm.module.flags = !{!83, !84, !85, !2, !3}
|
||||
// CHECK:STDOUT: !llvm.errno.tbaa = !{!87}
|
||||
// CHECK:STDOUT: !llvm.dbg.cu = !{!152}
|
||||
// CHECK:STDOUT: !llvm.module.flags = !{!79, !80, !81, !2, !3}
|
||||
// CHECK:STDOUT: !llvm.errno.tbaa = !{!83}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5}
|
||||
// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3}
|
||||
// CHECK:STDOUT: !21 = !{null}
|
||||
// CHECK:STDOUT: !22 = !DISubroutineType(types: !21)
|
||||
// CHECK:STDOUT: !74 = !{!"Simple C++ TBAA"}
|
||||
// CHECK:STDOUT: !75 = !{!"omnipotent char", !74, i64 0}
|
||||
// CHECK:STDOUT: !80 = !{!"int", !75, i64 0}
|
||||
// CHECK:STDOUT: !83 = !{i32 8, !"PIC Level", i32 2}
|
||||
// CHECK:STDOUT: !84 = !{i32 7, !"PIE Level", i32 2}
|
||||
// CHECK:STDOUT: !85 = !{i32 7, !"uwtable", i32 2}
|
||||
// CHECK:STDOUT: !86 = !{!"__libc_errno", !80, i64 0}
|
||||
// CHECK:STDOUT: !87 = !{!86, !80, i64 0}
|
||||
// CHECK:STDOUT: !159 = !DIFile(filename: "return_references_via_thunk.carbon", directory: "")
|
||||
// CHECK:STDOUT: !160 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !159, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
|
||||
// CHECK:STDOUT: !161 = distinct !DISubprogram(name: "GetRefs", linkageName: "_CGetRefs.Main", scope: null, file: !159, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !160)
|
||||
// CHECK:STDOUT: !162 = !DILocation(line: 18, column: 22, scope: !161)
|
||||
// CHECK:STDOUT: !165 = !DILocation(line: 19, column: 22, scope: !161)
|
||||
// CHECK:STDOUT: !168 = !DILocation(line: 20, column: 28, scope: !161)
|
||||
// CHECK:STDOUT: !171 = !DILocation(line: 22, column: 20, scope: !161)
|
||||
// CHECK:STDOUT: !174 = !DILocation(line: 23, column: 20, scope: !161)
|
||||
// CHECK:STDOUT: !177 = !DILocation(line: 24, column: 26, scope: !161)
|
||||
// CHECK:STDOUT: !180 = !DILocation(line: 17, column: 1, scope: !161)
|
||||
// CHECK:STDOUT: !70 = !{!"Simple C++ TBAA"}
|
||||
// CHECK:STDOUT: !71 = !{!"omnipotent char", !70, i64 0}
|
||||
// CHECK:STDOUT: !76 = !{!"int", !71, i64 0}
|
||||
// CHECK:STDOUT: !79 = !{i32 8, !"PIC Level", i32 2}
|
||||
// CHECK:STDOUT: !80 = !{i32 7, !"PIE Level", i32 2}
|
||||
// CHECK:STDOUT: !81 = !{i32 7, !"uwtable", i32 2}
|
||||
// CHECK:STDOUT: !82 = !{!"__libc_errno", !76, i64 0}
|
||||
// CHECK:STDOUT: !83 = !{!82, !76, i64 0}
|
||||
// CHECK:STDOUT: !151 = !DIFile(filename: "return_references_via_thunk.carbon", directory: "")
|
||||
// CHECK:STDOUT: !152 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !151, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
|
||||
// CHECK:STDOUT: !153 = distinct !DISubprogram(name: "GetRefs", linkageName: "_CGetRefs.Main", scope: null, file: !151, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !152)
|
||||
// CHECK:STDOUT: !154 = !DILocation(line: 18, column: 22, scope: !153)
|
||||
// CHECK:STDOUT: !157 = !DILocation(line: 19, column: 22, scope: !153)
|
||||
// CHECK:STDOUT: !160 = !DILocation(line: 20, column: 28, scope: !153)
|
||||
// CHECK:STDOUT: !163 = !DILocation(line: 22, column: 20, scope: !153)
|
||||
// CHECK:STDOUT: !166 = !DILocation(line: 23, column: 20, scope: !153)
|
||||
// CHECK:STDOUT: !169 = !DILocation(line: 24, column: 26, scope: !153)
|
||||
// CHECK:STDOUT: !172 = !DILocation(line: 17, column: 1, scope: !153)
|
||||
// CHECK:STDOUT:
|
||||
|
||||
Reference in New Issue
Block a user