mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +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,
|
new ExplicitSwiftModuleLoader(ctx, tracker, loadMode,
|
||||||
IgnoreSwiftSourceInfoFile));
|
IgnoreSwiftSourceInfoFile));
|
||||||
auto &Impl = result->Impl;
|
auto &Impl = result->Impl;
|
||||||
// Parse a JSON file to collect explicitly built modules.
|
// If the explicit module map is given, try parse it.
|
||||||
Impl.parseSwiftExplicitModuleMap(ExplicitSwiftModuleMap);
|
if (!ExplicitSwiftModuleMap.empty()) {
|
||||||
|
// Parse a JSON file to collect explicitly built modules.
|
||||||
|
Impl.parseSwiftExplicitModuleMap(ExplicitSwiftModuleMap);
|
||||||
|
}
|
||||||
// Collect .swiftmodule paths from -swift-module-path
|
// Collect .swiftmodule paths from -swift-module-path
|
||||||
// FIXME: remove these.
|
// FIXME: remove these.
|
||||||
for (auto path: ExplicitModulePaths) {
|
for (auto path: ExplicitModulePaths) {
|
||||||
|
|||||||
Reference in New Issue
Block a user