|
10 | 10 | //
|
11 | 11 | //===----------------------------------------------------------------------===//
|
12 | 12 | //
|
13 |
| -// This file implements the Decl class and subclasses. |
| 13 | +// This file handles lookups related to distributed actor decls. |
14 | 14 | //
|
15 | 15 | //===----------------------------------------------------------------------===//
|
16 | 16 |
|
@@ -89,7 +89,7 @@ Type swift::getDistributedActorSystemActorIDRequirementType(NominalTypeDecl *sys
|
89 | 89 | assert(!system->isDistributedActor());
|
90 | 90 | auto &ctx = system->getASTContext();
|
91 | 91 |
|
92 |
| - auto protocol = ctx.getProtocol(KnownProtocolKind::DistributedActorSystem); |
| 92 | + auto protocol = ctx.getDistributedActorSystemDecl(); |
93 | 93 | if (!protocol)
|
94 | 94 | return Type();
|
95 | 95 |
|
@@ -128,7 +128,7 @@ Type ASTContext::getAssociatedTypeOfDistributedSystemOfActor(
|
128 | 128 | if (!actorSystemDecl)
|
129 | 129 | return Type();
|
130 | 130 |
|
131 |
| - auto actorSystemProtocol = ctx.getProtocol(KnownProtocolKind::DistributedActorSystem); |
| 131 | + auto actorSystemProtocol = ctx.getDistributedActorSystemDecl(); |
132 | 132 | if (!actorSystemProtocol)
|
133 | 133 | return Type();
|
134 | 134 |
|
@@ -252,7 +252,7 @@ bool AbstractFunctionDecl::isDistributedActorSystemRemoteCall(bool isVoidReturn)
|
252 | 252 |
|
253 | 253 | // === Must be declared in a 'DistributedActorSystem' conforming type
|
254 | 254 | ProtocolDecl *systemProto =
|
255 |
| - C.getProtocol(KnownProtocolKind::DistributedActorSystem); |
| 255 | + C.getDistributedActorSystemDecl(); |
256 | 256 |
|
257 | 257 | auto systemNominal = getDeclContext()->getSelfNominalTypeDecl();
|
258 | 258 | auto distSystemConformance = module->lookupConformance(
|
@@ -968,7 +968,7 @@ llvm::SmallPtrSet<ProtocolDecl *, 2>
|
968 | 968 | swift::extractDistributedSerializationRequirements(
|
969 | 969 | ASTContext &C, ArrayRef<Requirement> allRequirements) {
|
970 | 970 | llvm::SmallPtrSet<ProtocolDecl *, 2> serializationReqs;
|
971 |
| - auto systemProto = C.getProtocol(KnownProtocolKind::DistributedActorSystem); |
| 971 | + auto systemProto = C.getDistributedActorSystemDecl(); |
972 | 972 | auto serializationReqAssocType =
|
973 | 973 | systemProto->getAssociatedType(C.Id_SerializationRequirement);
|
974 | 974 | auto systemSerializationReqTy = serializationReqAssocType->getInterfaceType();
|
|
0 commit comments