mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Frontend] Intro global control to force loading from swiftinterface
Intro ASTContext::setIgnoreAdjacentModules to change module loading to accept load only resilient modules from their swiftinterfaces, ignoring the adjacent module and any silencing swiftinterfaces errors.
This commit is contained in:
@@ -444,7 +444,8 @@ std::error_code ImplicitSerializedModuleLoader::findModuleFilesInDirectory(
|
||||
(!ModuleBuffer && !ModuleDocBuffer)) &&
|
||||
"Module and Module Doc buffer must both be initialized or NULL");
|
||||
|
||||
if (LoadMode == ModuleLoadingMode::OnlyInterface)
|
||||
if (LoadMode == ModuleLoadingMode::OnlyInterface ||
|
||||
Ctx.IgnoreAdjacentModules)
|
||||
return std::make_error_code(std::errc::not_supported);
|
||||
|
||||
auto ModuleErr = openModuleFile(ModuleID, BaseName, ModuleBuffer);
|
||||
|
||||
Reference in New Issue
Block a user