Skip to content

Commit 0050ad0

Browse files
authored
Merge pull request #1884 from apple/update-module-interface-checker
[lldb] Update lldb to use ModuleInterfaceChecker
2 parents 145d2f6 + f1acd78 commit 0050ad0

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)