Skip to content
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

[lldb][Type] Add TypeQuery::SetLanguages API #75926

Merged
merged 1 commit into from Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions lldb/include/lldb/Symbol/Type.h
Expand Up @@ -247,6 +247,10 @@ class TypeQuery {
/// match.
void AddLanguage(lldb::LanguageType language);

/// Set the list of languages that should produce a match to only the ones
/// specified in \ref languages.
void SetLanguages(LanguageSet languages);

/// Check if the language matches any languages that have been added to this
/// match object.
///
Expand Down
4 changes: 4 additions & 0 deletions lldb/source/Symbol/Type.cpp
Expand Up @@ -145,6 +145,10 @@ void TypeQuery::AddLanguage(LanguageType language) {
m_languages->Insert(language);
}

void TypeQuery::SetLanguages(LanguageSet languages) {
m_languages = std::move(languages);
}

bool TypeQuery::ContextMatches(
llvm::ArrayRef<CompilerContext> context_chain) const {
if (GetExactMatch() || context_chain.size() == m_context.size())
Expand Down