mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Make Destroy.Op functions able to have a body (#6729)
This is iterating on how `Destroy.Op` generates, to start adding body capabilities. This changes the way the signature is created, and adds a `CoreWitness` function kind so that mangling can prevent name collisions. The result is that what _was_ `DestroyOp` is now `Core.Destroy.Op` or, as can be seen in toolchain/lower/testdata/interop/cpp/nullptr.carbon, `_COp.<hash>:core.Destroy.Core` where `:core` is indicating that it's a core witness (taking a note from `:thunk`). Assisted-by: Google Antigravity with Gemini 3 Flash
This commit is contained in:
@@ -96,6 +96,8 @@ fn ConvertNullptrConstant() -> Core.Optional(i32*) {
|
||||
// CHECK:STDOUT: ret void, !dbg !24
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: declare void @"_COp.7c9703d73655494a:core.Destroy.Core"(ptr)
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: declare void @_Z7TakePtrPi(ptr noundef) #1
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: declare ptr @"_COp.NullptrT.CppCompat.Core:Copy.Core"(ptr)
|
||||
|
||||
Reference in New Issue
Block a user