Skip to content

Commit 35aa7f8

Browse files
authored
Merge pull request #42596 from rxwei/prepare-enable-string-processing
Prepare to (but does not) enable string processing by default.
2 parents 605889b + 7244f78 commit 35aa7f8

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

include/swift/Option/FrontendOptions.td

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -422,10 +422,6 @@ def disable_implicit_concurrency_module_import : Flag<["-"],
422422
"disable-implicit-concurrency-module-import">,
423423
HelpText<"Disable the implicit import of the _Concurrency module.">;
424424

425-
def disable_implicit_distributed_module_import : Flag<["-"],
426-
"disable-implicit-distributed-module-import">,
427-
HelpText<"Disable the implicit import of the Distributed module.">;
428-
429425
def disable_implicit_string_processing_module_import : Flag<["-"],
430426
"disable-implicit-string-processing-module-import">,
431427
HelpText<"Disable the implicit import of the _StringProcessing module.">;

lib/Frontend/Frontend.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,9 @@ bool CompilerInvocation::shouldImportSwiftConcurrency() const {
794794

795795
bool CompilerInvocation::shouldImportSwiftStringProcessing() const {
796796
return getLangOptions().EnableExperimentalStringProcessing &&
797-
!getLangOptions().DisableImplicitStringProcessingModuleImport;
797+
!getLangOptions().DisableImplicitStringProcessingModuleImport &&
798+
getFrontendOptions().InputMode !=
799+
FrontendOptions::ParseInputMode::SwiftModuleInterface;
798800
}
799801

800802
/// Implicitly import the SwiftOnoneSupport module in non-optimized

stdlib/cmake/modules/AddSwiftStdlib.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1754,10 +1754,10 @@ function(add_swift_target_library name)
17541754
# Turn off implicit import of _Concurrency when building libraries
17551755
list(APPEND SWIFTLIB_SWIFT_COMPILE_FLAGS "-Xfrontend;-disable-implicit-concurrency-module-import")
17561756

1757-
# Turn off implicit import of Distributed when building libraries
1758-
if(SWIFT_ENABLE_EXPERIMENTAL_DISTRIBUTED)
1757+
# Turn off implicit import of _StringProcessing when building libraries
1758+
if(SWIFT_ENABLE_EXPERIMENTAL_STRING_PROCESSING)
17591759
list(APPEND SWIFTLIB_SWIFT_COMPILE_FLAGS
1760-
"-Xfrontend;-disable-implicit-distributed-module-import")
1760+
"-Xfrontend;-disable-implicit-string-processing-module-import")
17611761
endif()
17621762

17631763
if(SWIFTLIB_IS_STDLIB AND SWIFT_STDLIB_ENABLE_PRESPECIALIZATION)

0 commit comments

Comments
 (0)