ModuleInterface: refactor several configuration values into an Option struct

This commit is contained in:
Xi Ge
2020-06-01 15:04:21 -07:00
parent 1ae70a5b26
commit 28b0b22a42
5 changed files with 45 additions and 65 deletions

View File

@@ -778,6 +778,7 @@ static bool buildModuleFromInterface(CompilerInstance &Instance) {
assert(FEOpts.InputsAndOutputs.hasSingleInput());
StringRef InputPath = FEOpts.InputsAndOutputs.getFilenameOfFirstInput();
StringRef PrebuiltCachePath = FEOpts.PrebuiltModuleCachePath;
ModuleInterfaceLoaderOptions LoaderOpts(FEOpts);
return ModuleInterfaceLoader::buildSwiftModuleFromSwiftInterface(
Instance.getSourceMgr(), Instance.getDiags(),
Invocation.getSearchPathOptions(), Invocation.getLangOptions(),
@@ -786,9 +787,7 @@ static bool buildModuleFromInterface(CompilerInstance &Instance) {
PrebuiltCachePath, Invocation.getModuleName(), InputPath,
Invocation.getOutputFilename(),
FEOpts.SerializeModuleInterfaceDependencyHashes,
FEOpts.TrackSystemDeps, FEOpts.RemarkOnRebuildFromModuleInterface,
FEOpts.DisableInterfaceFileLock,
FEOpts.DisableImplicitModules);
FEOpts.TrackSystemDeps, LoaderOpts);
}
static bool compileLLVMIR(CompilerInstance &Instance) {