Refactor 'ModuleInterfaceBuilder' to separate CompilerInstance setup logic from compilation logic (moved to ExplicitModuleInterfaceBuilder).

This commit is contained in:
Artem Chikin
2022-08-04 14:40:09 -07:00
parent e5a35f9819
commit 7fd2a29fb7
11 changed files with 413 additions and 319 deletions

View File

@@ -423,6 +423,9 @@ static bool buildModuleFromInterface(CompilerInstance &Instance) {
ModuleInterfaceLoaderOptions LoaderOpts(FEOpts);
StringRef ABIPath = Instance.getPrimarySpecificPathsForAtMostOnePrimary()
.SupplementaryOutputs.ABIDescriptorOutputPath;
return ModuleInterfaceLoader::buildSwiftModuleFromSwiftInterface(
Instance.getSourceMgr(), Instance.getDiags(),
Invocation.getSearchPathOptions(), Invocation.getLangOptions(),