mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Concurrency] Add support for @GlobalActor(unsafe).
Allow us to tag declarations that are meant to be in a global actor, but for which we don't yet want to enforce everything. This will be used for better staging-in of global actor annotations, but for now it's a fancy way to document @actorIndependent(unsafe). Stages in the syntax for rdar://74241687 without really implementing it.
This commit is contained in:
@@ -4396,9 +4396,10 @@ llvm::Error DeclDeserializer::deserializeDeclAttributes() {
|
||||
|
||||
case decls_block::Custom_DECL_ATTR: {
|
||||
bool isImplicit;
|
||||
bool isArgUnsafe;
|
||||
TypeID typeID;
|
||||
serialization::decls_block::CustomDeclAttrLayout::readRecord(
|
||||
scratch, isImplicit, typeID);
|
||||
scratch, isImplicit, typeID, isArgUnsafe);
|
||||
|
||||
Expected<Type> deserialized = MF.getTypeChecked(typeID);
|
||||
if (!deserialized) {
|
||||
@@ -4412,7 +4413,9 @@ llvm::Error DeclDeserializer::deserializeDeclAttributes() {
|
||||
return deserialized.takeError();
|
||||
} else {
|
||||
auto *TE = TypeExpr::createImplicit(deserialized.get(), ctx);
|
||||
Attr = CustomAttr::create(ctx, SourceLoc(), TE, isImplicit);
|
||||
auto custom = CustomAttr::create(ctx, SourceLoc(), TE, isImplicit);
|
||||
custom->setArgIsUnsafe(isArgUnsafe);
|
||||
Attr = custom;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user