Enable SubobjectDestroy.Op to destroy a struct's fields (#7829)

This is a partial implementation of #7362.
This commit is contained in:
Christopher Di Bella
2026-09-29 00:13:37 +00:00
committed by GitHub
parent 6abcfa24b2
commit b0bc5ed338
67 changed files with 671 additions and 3 deletions
@@ -121,6 +121,10 @@ fn F_nested_tuple(a: ((i32, i32), X)) -> ((i32, i32), X) {
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b4c762864cd9a02b:core.Destroy.Core"(ptr %self) #0 !dbg !72 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %.loc44_13.1.b = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !74
// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc44_13.1.b), !dbg !74
// CHECK:STDOUT: %.loc44_13.2.a = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !74
// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc44_13.2.a), !dbg !74
// CHECK:STDOUT: ret void, !dbg !74
// CHECK:STDOUT: }
// CHECK:STDOUT: