mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Frontend: add a front-end option to specify module names for which we prefer to loading via interfaces
ABI checker imports Swift frameworks by using Swift interfaces for various reasons. The existing way of controlling preferred importing mechanism is by setting an environment variable (SWIFT_FORCE_MODULE_LOADING), which may lead to performance issues because the stdlib could also be loaded in this way. This patch adds a new front-end option to specify module names for which we prefer to importing via Swift interface. The option currently is only accessible via swift-api-digester. rdar://54559888
This commit is contained in:
@@ -104,8 +104,10 @@ Optional<bool> forEachModuleSearchPath(
|
||||
|
||||
// Defined out-of-line so that we can see ~ModuleFile.
|
||||
SerializedModuleLoaderBase::SerializedModuleLoaderBase(
|
||||
ASTContext &ctx, DependencyTracker *tracker, ModuleLoadingMode loadMode)
|
||||
: ModuleLoader(tracker), Ctx(ctx), LoadMode(loadMode) {}
|
||||
ASTContext &ctx, DependencyTracker *tracker, ModuleLoadingMode loadMode,
|
||||
ArrayRef<std::string> PreferInterfaceForModules)
|
||||
: ModuleLoader(tracker), Ctx(ctx), LoadMode(loadMode),
|
||||
PreferInterfaceForModules(PreferInterfaceForModules) {}
|
||||
|
||||
SerializedModuleLoaderBase::~SerializedModuleLoaderBase() = default;
|
||||
SerializedModuleLoader::~SerializedModuleLoader() = default;
|
||||
|
||||
Reference in New Issue
Block a user