[AST/Sema] Distributed: Introduced unified way to retrieve serialization requirements for actors

This commit is contained in:
Pavel Yaskevich
2024-03-05 16:45:54 -08:00
parent 35478a6f21
commit 7b7716cda9
6 changed files with 116 additions and 141 deletions

View File

@@ -878,13 +878,9 @@ static bool canSynthesizeDistributedThunk(AbstractFunctionDecl *distributedTarge
return true;
}
SmallPtrSet<ProtocolDecl *, 2> requirementProtos;
if (getSerializationRequirementTypesForMember(distributedTarget,
requirementProtos)) {
return true;
}
return false;
auto serializationTy =
getDistributedActorSerializationType(distributedTarget->getDeclContext());
return serializationTy && !serializationTy->hasDependentMember();
}
/******************************************************************************/