mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-03 19:32:35 +00:00
[lldb][Type] Add TypeQuery::SetLanguages API (#75926)
This is required for users of `TypeQuery` that limit the set of languages of the query using APIs such as `GetSupportedLanguagesForTypes` or `GetSupportedLanguagesForExpressions`. Example usage: https://github.com/apple/llvm-project/pull/7885
This commit is contained in:
parent
f7cb1afa06
commit
4ea5c603b4
@ -247,6 +247,10 @@ public:
|
||||
/// 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.
|
||||
///
|
||||
|
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user