mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Allow Builtin.Take -> ~Escapable
This commit is contained in:
@@ -240,6 +240,7 @@ BUILTIN_SIL_OPERATION(LoadRaw, "loadRaw", Special)
|
||||
BUILTIN_SIL_OPERATION(LoadInvariant, "loadInvariant", Special)
|
||||
|
||||
/// Take has type (Builtin.RawPointer) -> T
|
||||
/// where T: ~Copyable & ~Escapable
|
||||
BUILTIN_SIL_OPERATION(Take, "take", Special)
|
||||
|
||||
/// Destroy has type (T.Type, Builtin.RawPointer) -> ()
|
||||
|
||||
@@ -931,8 +931,7 @@ static ValueDecl *getLoadOperation(ASTContext &ctx, Identifier id) {
|
||||
|
||||
static ValueDecl *getTakeOperation(ASTContext &ctx, Identifier id) {
|
||||
return getBuiltinFunction(ctx, id, _thin,
|
||||
_generics(_unrestricted,
|
||||
_conformsTo(_typeparam(0), _escapable)),
|
||||
_generics(_unrestricted),
|
||||
_parameters(_rawPointer),
|
||||
_typeparam(0));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user