ExplicitModuleLoader: take a JSON file that specifies details of explicit Swift modules

Instead of taking paths of Swift module files from front-end command line
arguments, we should take a JSON file specifying details of explicit modules.
The advantages is (1) .swiftdoc and .swiftsourceinfo can be associated
with a .swiftmodule file, and (2) module names are explicitly used as
keys in the JSON input so we don't need to eagerly deserialize a .swiftmodule
file to collect the module name.
This commit is contained in:
Xi Ge
2020-06-12 12:12:52 -07:00
parent 1c8ad2f615
commit ec9cd91c1b
7 changed files with 150 additions and 8 deletions

View File

@@ -150,6 +150,7 @@ public:
create(ASTContext &ctx,
DependencyTracker *tracker, ModuleLoadingMode loadMode,
ArrayRef<std::string> ExplicitModulePaths,
StringRef ExplicitSwiftModuleMap,
bool IgnoreSwiftSourceInfoFile);
/// Append visible module names to \p names. Note that names are possibly