[SIL] Hollow out Builtin.copy, deprecate _copy.

The copy operator has been implemented and doesn't use it.  Remove
`Builtin.copy` and `_copy` as much as currently possible.

Source compatibility requires that `_copy` remain in the stdlib.  It is
deprecated here and just uses the copy operator.

Handling old swiftinterfaces requires that `Builtin.copy` be defined.
Redefine it here as a passthrough--SILGen machinery will produce the
necessary copy_addr.

rdar://127502242
This commit is contained in:
Nate Chandler
2024-05-03 15:53:36 -07:00
parent 6fdaea514f
commit 06921cfe84
20 changed files with 98 additions and 260 deletions

View File

@@ -183,7 +183,6 @@ static bool isBarrier(SILInstruction *inst) {
case BuiltinValueKind::AssignCopyArrayFrontToBack:
case BuiltinValueKind::AssignCopyArrayBackToFront:
case BuiltinValueKind::AssignTakeArray:
case BuiltinValueKind::Copy:
case BuiltinValueKind::CancelAsyncTask:
case BuiltinValueKind::StartAsyncLet:
case BuiltinValueKind::CreateAsyncTask: