Skip to content

Commit fa80f22

Browse files
committed
[Frontend] A]llow loading the adjacent module for _StringProcessing
1 parent 26b9a0d commit fa80f22

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/Frontend/ModuleInterfaceLoader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ class ModuleInterfaceLoaderImpl {
676676
std::pair<std::string, std::string> result;
677677
// Should we attempt to load a swiftmodule adjacent to the swiftinterface?
678678
bool shouldLoadAdjacentModule = !ctx.IgnoreAdjacentModules ||
679-
moduleName == STDLIB_NAME;
679+
moduleName == STDLIB_NAME || moduleName == SWIFT_STRING_PROCESSING_NAME;
680680

681681
// Don't use the adjacent swiftmodule for frameworks from the public
682682
// Frameworks folder of the SDK.

lib/Serialization/SerializedModuleLoader.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,8 @@ std::error_code ImplicitSerializedModuleLoader::findModuleFilesInDirectory(
446446
"Module and Module Doc buffer must both be initialized or NULL");
447447

448448
if (LoadMode == ModuleLoadingMode::OnlyInterface ||
449-
(Ctx.IgnoreAdjacentModules && ModuleID.Item.str() != STDLIB_NAME))
449+
(Ctx.IgnoreAdjacentModules && ModuleID.Item.str() != STDLIB_NAME &&
450+
ModuleID.Item.str() !=SWIFT_STRING_PROCESSING_NAME))
450451
return std::make_error_code(std::errc::not_supported);
451452

452453
auto ModuleErr = openModuleFile(ModuleID, BaseName, ModuleBuffer);

0 commit comments

Comments
 (0)