[Distributed] Only parse distributed when experimentla mode enabled

This commit is contained in:
Konrad `ktoso` Malawski
2021-08-16 17:06:00 +09:00
parent 86c72453da
commit fbd66e2b87
16 changed files with 131 additions and 22 deletions

View File

@@ -779,12 +779,6 @@ bool CompilerInvocation::shouldImportSwiftConcurrency() const {
FrontendOptions::ParseInputMode::SwiftModuleInterface;
}
bool CompilerInvocation::shouldImportSwiftDistributed() const {
return getLangOptions().EnableExperimentalDistributed &&
getFrontendOptions().InputMode !=
FrontendOptions::ParseInputMode::SwiftModuleInterface;
}
/// Implicitly import the SwiftOnoneSupport module in non-optimized
/// builds. This allows for use of popular specialized functions
/// from the standard library, which makes the non-optimized builds
@@ -825,6 +819,11 @@ bool CompilerInstance::canImportSwiftConcurrency() const {
{getASTContext().getIdentifier(SWIFT_CONCURRENCY_NAME), SourceLoc()});
}
bool CompilerInstance::canImportSwiftDistributed() const {
return getASTContext().canImportModule(
{getASTContext().getIdentifier(SWIFT_DISTRIBUTED_NAME), SourceLoc()});
}
ImplicitImportInfo CompilerInstance::getImplicitImportInfo() const {
auto &frontendOpts = Invocation.getFrontendOptions();