Skip to content

Commit 1e821f2

Browse files
authored
Merge pull request #42008 from DougGregor/fully-remove-distributed-checks
Fully remove distributed checks
2 parents fbbfb70 + c4e6e6d commit 1e821f2

File tree

6 files changed

+1
-31
lines changed

6 files changed

+1
-31
lines changed

include/swift/AST/Attr.def

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,6 @@ SIMPLE_DECL_ATTR(_inheritActorContext, InheritActorContext,
657657

658658
CONTEXTUAL_SIMPLE_DECL_ATTR(distributed, DistributedActor,
659659
DeclModifier | OnClass | OnFunc | OnVar |
660-
DistributedOnly |
661660
ABIBreakingToAdd | ABIBreakingToRemove |
662661
APIBreakingToAdd | APIBreakingToRemove,
663662
118)
@@ -723,7 +722,6 @@ DECL_ATTR(_backDeploy, BackDeploy,
723722

724723
CONTEXTUAL_SIMPLE_DECL_ATTR(_local, KnownToBeLocal,
725724
DeclModifier | OnFunc | OnParam | OnVar |
726-
DistributedOnly |
727725
ABIBreakingToAdd | ABIBreakingToRemove |
728726
APIBreakingToAdd | APIBreakingToRemove,
729727
130)

include/swift/AST/Attr.h

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -287,11 +287,8 @@ class DeclAttribute : public AttributeBase {
287287
/// Whether this attribute is only valid when concurrency is enabled.
288288
ConcurrencyOnly = 1ull << (unsigned(DeclKindIndex::Last_Decl) + 16),
289289

290-
/// Whether this attribute is only valid when distributed is enabled.
291-
DistributedOnly = 1ull << (unsigned(DeclKindIndex::Last_Decl) + 17),
292-
293290
/// Whether this attribute is valid on additional decls in ClangImporter.
294-
OnAnyClangDecl = 1ull << (unsigned(DeclKindIndex::Last_Decl) + 18),
291+
OnAnyClangDecl = 1ull << (unsigned(DeclKindIndex::Last_Decl) + 17),
295292
};
296293

297294
LLVM_READNONE
@@ -386,10 +383,6 @@ class DeclAttribute : public AttributeBase {
386383
return getOptions(DK) & ConcurrencyOnly;
387384
}
388385

389-
static bool isDistributedOnly(DeclAttrKind DK) {
390-
return getOptions(DK) & DistributedOnly;
391-
}
392-
393386
static bool isUserInaccessible(DeclAttrKind DK) {
394387
return getOptions(DK) & UserInaccessible;
395388
}

include/swift/Basic/LangOptions.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -343,9 +343,6 @@ namespace swift {
343343
/// Enable inference of Sendable conformances for public types.
344344
bool EnableInferPublicSendable = false;
345345

346-
/// Enable experimental 'distributed' actors and functions.
347-
bool EnableExperimentalDistributed = true;
348-
349346
/// Enable experimental 'move only' features.
350347
bool EnableExperimentalMoveOnly = false;
351348

lib/Frontend/CompilerInvocation.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -459,9 +459,6 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
459459
Opts.EnableExperimentalVariadicGenerics |=
460460
Args.hasArg(OPT_enable_experimental_variadic_generics);
461461

462-
Opts.EnableExperimentalDistributed |=
463-
Args.hasArg(OPT_enable_experimental_distributed);
464-
465462
Opts.EnableExperimentalMoveOnly |=
466463
Args.hasArg(OPT_enable_experimental_move_only);
467464

@@ -485,12 +482,6 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
485482
Opts.DisableImplicitConcurrencyModuleImport |=
486483
Args.hasArg(OPT_disable_implicit_concurrency_module_import);
487484

488-
/// experimental distributed also implicitly enables experimental concurrency
489-
Opts.EnableExperimentalDistributed |=
490-
Args.hasArg(OPT_enable_experimental_distributed);
491-
Opts.EnableExperimentalConcurrency |=
492-
Args.hasArg(OPT_enable_experimental_distributed);
493-
494485
if (Args.hasArg(OPT_enable_experimental_async_top_level))
495486
Diags.diagnose(SourceLoc(), diag::warn_flag_deprecated,
496487
"-enable-experimental-async-top-level");

tools/sil-opt/SILOpt.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,8 +559,6 @@ int main(int argc, char **argv) {
559559
}
560560
Invocation.getLangOptions().EnableExperimentalConcurrency =
561561
EnableExperimentalConcurrency;
562-
Invocation.getLangOptions().EnableExperimentalDistributed =
563-
EnableExperimentalDistributed;
564562
Optional<bool> enableExperimentalMoveOnly =
565563
toOptionalBool(EnableExperimentalMoveOnly);
566564
if (enableExperimentalMoveOnly)

tools/swift-ide-test/swift-ide-test.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4271,13 +4271,6 @@ int main(int argc, char *argv[]) {
42714271
InitInvok.getLangOptions().EnableExperimentalNamedOpaqueTypes = true;
42724272
}
42734273

4274-
if (options::EnableExperimentalDistributed) {
4275-
// distributed implies concurrency features:
4276-
InitInvok.getLangOptions().EnableExperimentalConcurrency = true;
4277-
// enable 'distributed' parsing and features
4278-
InitInvok.getLangOptions().EnableExperimentalDistributed = true;
4279-
}
4280-
42814274
if (!options::Triple.empty())
42824275
InitInvok.setTargetTriple(options::Triple);
42834276
if (!options::SwiftVersion.empty()) {

0 commit comments

Comments
 (0)