@@ -3363,6 +3363,12 @@ swift::ASTContext *SwiftASTContext::GetASTContext() {
3363
3363
m_ast_context_ap->addModuleLoader (std::move (memory_buffer_loader_ap));
3364
3364
}
3365
3365
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
+
3366
3372
// 2. Create and install the module interface loader.
3367
3373
//
3368
3374
// The ordering of 2-4 is the same as the Swift compiler's 1-3,
@@ -3377,8 +3383,9 @@ swift::ASTContext *SwiftASTContext::GetASTContext() {
3377
3383
if (loading_mode != swift::ModuleLoadingMode::OnlySerialized) {
3378
3384
std::unique_ptr<swift::ModuleLoader> module_interface_loader_ap (
3379
3385
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));
3382
3389
if (module_interface_loader_ap)
3383
3390
m_ast_context_ap->addModuleLoader (std::move (module_interface_loader_ap));
3384
3391
}
0 commit comments