Skip to content

Commit b3518aa

Browse files
authored
[Distributed] minimal, remove accidental cpp include in CodeSynthesis.cpp (#37845)
1 parent b7de0be commit b3518aa

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

lib/Sema/CodeSynthesis.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "TypeCheckDecl.h"
2121
#include "TypeCheckObjC.h"
2222
#include "TypeCheckType.h"
23+
#include "TypeCheckDistributed.h"
2324
#include "swift/AST/ASTPrinter.h"
2425
#include "swift/AST/Availability.h"
2526
#include "swift/AST/Expr.h"
@@ -35,7 +36,6 @@
3536
#include "swift/Sema/ConstraintSystem.h"
3637
#include "llvm/ADT/SmallString.h"
3738
#include "llvm/ADT/StringExtras.h"
38-
#include "CodeSynthesisDistributedActor.cpp" // FIXME: remove this!!!
3939
using namespace swift;
4040

4141
const bool IsImplicit = true;

lib/Sema/CodeSynthesisDistributedActor.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13+
#include "TypeCheckDistributed.h"
14+
1315
#include "CodeSynthesis.h"
1416

1517
#include "TypeChecker.h"
@@ -426,7 +428,6 @@ static void collectNonOveriddenDistributedActorInits(
426428

427429
/// For a distributed actor, automatically define initializers
428430
/// that match the DistributedActor requirements.
429-
// TODO: inheritance is tricky here?
430431
static void addImplicitDistributedActorConstructors(ClassDecl *decl) {
431432
// Bail out if not a distributed actor definition.
432433
if (!decl->isDistributedActor())
@@ -716,7 +717,7 @@ static void addImplicitRemoteActorFunctions(ClassDecl *decl) {
716717
/******************************************************************************/
717718

718719
/// Entry point for adding all computed members to a distributed actor decl.
719-
static void addImplicitDistributedActorMembersToClass(ClassDecl *decl) {
720+
void swift::addImplicitDistributedActorMembersToClass(ClassDecl *decl) {
720721
// Bail out if not a distributed actor definition.
721722
if (!decl->isDistributedActor())
722723
return;

lib/Sema/DerivedConformanceDistributedActor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ bool DerivedConformance::canDeriveDistributedActor(
3131
// ==== ------------------------------------------------------------------------
3232

3333
ValueDecl *DerivedConformance::deriveDistributedActor(ValueDecl *requirement) {
34-
return nullptr;
34+
return nullptr;
3535
}

lib/Sema/TypeCheckDistributed.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ void checkDistributedActorConstructor(ClassDecl *decl, ConstructorDecl *ctor);
5252

5353
bool checkDistributedFunction(FuncDecl *decl, bool diagnose);
5454

55+
/// Synthesis of members which are not directly driven filling in protocol requirements,
56+
/// such as the default local and resolve constructors, and `_remote_` function stubs.
57+
void addImplicitDistributedActorMembersToClass(ClassDecl *decl);
58+
5559
}
5660

5761

0 commit comments

Comments
 (0)