mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
ExplictModuleLoader: don't fail while no explicit Swift module map is specified
We will eventually move the protocol entirely to using a JSON file for explicit Swift modules. Before we finish migrating, we should be forgiving about using the legacy -swift-module-file argument.
This commit is contained in:
@@ -1602,8 +1602,11 @@ ExplicitSwiftModuleLoader::create(ASTContext &ctx,
|
||||
new ExplicitSwiftModuleLoader(ctx, tracker, loadMode,
|
||||
IgnoreSwiftSourceInfoFile));
|
||||
auto &Impl = result->Impl;
|
||||
// Parse a JSON file to collect explicitly built modules.
|
||||
Impl.parseSwiftExplicitModuleMap(ExplicitSwiftModuleMap);
|
||||
// If the explicit module map is given, try parse it.
|
||||
if (!ExplicitSwiftModuleMap.empty()) {
|
||||
// Parse a JSON file to collect explicitly built modules.
|
||||
Impl.parseSwiftExplicitModuleMap(ExplicitSwiftModuleMap);
|
||||
}
|
||||
// Collect .swiftmodule paths from -swift-module-path
|
||||
// FIXME: remove these.
|
||||
for (auto path: ExplicitModulePaths) {
|
||||
|
||||
Reference in New Issue
Block a user