[Distributed] Move dist funcdecl getters to ASTContext

This commit is contained in:
Konrad `ktoso` Malawski
2022-01-28 10:57:39 +09:00
parent 6da455e0fa
commit e2c61d37ba
5 changed files with 95 additions and 136 deletions

View File

@@ -670,29 +670,30 @@ public:
NominalTypeDecl *actorOrSystem,
bool isVoidReturn) const;
/// Retrieve the declaration of DistributedActorSystem.make().
///
/// \param actorOrSystem distributed actor or actor system to get the
/// remoteCall function for. Since the method we're looking for is an ad-hoc
/// requirement, a specific type MUST be passed here as it is not possible
/// to obtain the decl from just the `DistributedActorSystem` protocol type.
FuncDecl *getMakeInvocationEncoderOnDistributedActorSystem(
NominalTypeDecl *actorOrSystem) const;
// Retrieve the declaration of DistributedInvocationEncoder.recordArgument(_:).
//
// \param nominal optionally provide a 'NominalTypeDecl' from which the
// function decl shall be extracted. This is useful to avoid witness calls
// through the protocol which is looked up when nominal is null.
FuncDecl *getRecordArgumentOnDistributedInvocationEncoder(
NominalTypeDecl *nominal = nullptr) const;
NominalTypeDecl *nominal) const;
// Retrieve the declaration of DistributedInvocationEncoder.recordErrorType().
//
// \param nominal optionally provide a 'NominalTypeDecl' from which the
// function decl shall be extracted. This is useful to avoid witness calls
// through the protocol which is looked up when nominal is null.
// Retrieve the declaration of DistributedInvocationEncoder.recordErrorType(_:).
FuncDecl *getRecordErrorTypeOnDistributedInvocationEncoder(
NominalTypeDecl *nominal = nullptr) const;
NominalTypeDecl *nominal) const;
// Retrieve the declaration of DistributedInvocationEncoder.recordReturnType().
//
// \param nominal optionally provide a 'NominalTypeDecl' from which the
// function decl shall be extracted. This is useful to avoid witness calls
// through the protocol which is looked up when nominal is null.
// Retrieve the declaration of DistributedInvocationEncoder.recordReturnType(_:).
FuncDecl *getRecordReturnTypeOnDistributedInvocationEncoder(
NominalTypeDecl *nominal = nullptr) const;
NominalTypeDecl *nominal) const;
// Retrieve the declaration of DistributedInvocationEncoder.doneRecording().
//
@@ -700,8 +701,7 @@ public:
// function decl shall be extracted. This is useful to avoid witness calls
// through the protocol which is looked up when nominal is null.
FuncDecl *getDoneRecordingOnDistributedInvocationEncoder(
NominalTypeDecl *nominal = nullptr) const;
NominalTypeDecl *nominal) const;
/// Look for the declaration with the given name within the
/// passed in module.