@@ -3363,6 +3363,12 @@ swift::ASTContext *SwiftASTContext::GetASTContext() {
33633363    m_ast_context_ap->addModuleLoader (std::move (memory_buffer_loader_ap));
33643364  }
33653365
3366+   //  Add a module interface checker.
3367+   m_ast_context_ap->addModuleInterfaceChecker (
3368+     std::make_unique<swift::ModuleInterfaceCheckerImpl>(*m_ast_context_ap,
3369+       moduleCachePath, prebuiltModuleCachePath,
3370+       swift::ModuleInterfaceLoaderOptions ()));
3371+ 
33663372  //  2. Create and install the module interface loader.
33673373  // 
33683374  //  The ordering of 2-4 is the same as the Swift compiler's 1-3,
@@ -3377,8 +3383,9 @@ swift::ASTContext *SwiftASTContext::GetASTContext() {
33773383  if  (loading_mode != swift::ModuleLoadingMode::OnlySerialized) {
33783384    std::unique_ptr<swift::ModuleLoader> module_interface_loader_ap (
33793385        swift::ModuleInterfaceLoader::create (
3380-             *m_ast_context_ap, moduleCachePath, prebuiltModuleCachePath,
3381-             m_dependency_tracker.get (), loading_mode));
3386+           *m_ast_context_ap, *static_cast <swift::ModuleInterfaceCheckerImpl*>(
3387+             m_ast_context_ap->getModuleInterfaceChecker ()), m_dependency_tracker.get (),
3388+           loading_mode));
33823389    if  (module_interface_loader_ap)
33833390      m_ast_context_ap->addModuleLoader (std::move (module_interface_loader_ap));
33843391  }
0 commit comments