Skip to content

[lldb] Update lldb to use ModuleInterfaceChecker #1884

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 2, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3363,6 +3363,12 @@ swift::ASTContext *SwiftASTContext::GetASTContext() {
m_ast_context_ap->addModuleLoader(std::move(memory_buffer_loader_ap));
}

// Add a module interface checker.
m_ast_context_ap->addModuleInterfaceChecker(
std::make_unique<swift::ModuleInterfaceCheckerImpl>(*m_ast_context_ap,
moduleCachePath, prebuiltModuleCachePath,
swift::ModuleInterfaceLoaderOptions()));

// 2. Create and install the module interface loader.
//
// The ordering of 2-4 is the same as the Swift compiler's 1-3,
Expand All @@ -3377,8 +3383,9 @@ swift::ASTContext *SwiftASTContext::GetASTContext() {
if (loading_mode != swift::ModuleLoadingMode::OnlySerialized) {
std::unique_ptr<swift::ModuleLoader> module_interface_loader_ap(
swift::ModuleInterfaceLoader::create(
*m_ast_context_ap, moduleCachePath, prebuiltModuleCachePath,
m_dependency_tracker.get(), loading_mode));
*m_ast_context_ap, *static_cast<swift::ModuleInterfaceCheckerImpl*>(
m_ast_context_ap->getModuleInterfaceChecker()), m_dependency_tracker.get(),
loading_mode));
if (module_interface_loader_ap)
m_ast_context_ap->addModuleLoader(std::move(module_interface_loader_ap));
}
Expand Down