mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[moveOnly] Implement a new _copy function that performs an explicit copy value.
The key thing is that the move checker will not consider the explicit copy value to be a copy_value that can be rewritten, ensuring that any uses of the result of the explicit copy_value (consuming or other wise) are not checked. Similar to the _move operator I recently introduced, this is a transparent function so we can perform one level of specialization and thus at least be generic over all concrete types.
This commit is contained in:
@@ -175,6 +175,7 @@ static bool isBarrier(SILInstruction *inst) {
|
||||
case BuiltinValueKind::AssignTakeArray:
|
||||
case BuiltinValueKind::UnsafeGuaranteed:
|
||||
case BuiltinValueKind::Move:
|
||||
case BuiltinValueKind::Copy:
|
||||
case BuiltinValueKind::UnsafeGuaranteedEnd:
|
||||
case BuiltinValueKind::CancelAsyncTask:
|
||||
case BuiltinValueKind::StartAsyncLet:
|
||||
|
||||
Reference in New Issue
Block a user