mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
ModuleInterface: refactor ModuleInterfaceChecker out of ModuleInterfaceLoader
This refactoring allows us to drop ModuleInterfaceLoader when explicit modules are enabled. Before this change, the dependencies scanner needs the loader to be present to access functionalities like collecting prebuilt module candidates.
This commit is contained in:
@@ -170,10 +170,9 @@ bool ModuleInterfaceBuilder::buildSwiftModuleInternal(
|
||||
auto &SubInstance = *info.Instance;
|
||||
auto subInvocation = SubInstance.getInvocation();
|
||||
// Try building forwarding module first. If succeed, return.
|
||||
if (static_cast<ModuleInterfaceLoader*>(SubInstance.getASTContext()
|
||||
.getModuleInterfaceLoader())->tryEmitForwardingModule(moduleName,
|
||||
interfacePath,
|
||||
CompiledCandidates, OutPath)) {
|
||||
if (SubInstance.getASTContext().getModuleInterfaceChecker()
|
||||
->tryEmitForwardingModule(moduleName, interfacePath,
|
||||
CompiledCandidates, OutPath)) {
|
||||
return std::error_code();
|
||||
}
|
||||
FrontendOptions &FEOpts = subInvocation.getFrontendOptions();
|
||||
|
||||
Reference in New Issue
Block a user