[TypeCategory] Nothing passes down a list of languages.

Summary: This should allow further simplifications, but it's a first step.

Reviewers: teemperor, jingham, friss

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D70983
This commit is contained in:
Davide Italiano 2019-12-03 13:36:50 -08:00
parent b3fdf33ba6
commit 15a172bebb
2 changed files with 4 additions and 9 deletions

View File

@ -214,8 +214,7 @@ public:
ValidatorContainer::RegexMatchForEachCallback m_validator_regex;
};
TypeCategoryImpl(IFormatChangeListener *clist, ConstString name,
std::initializer_list<lldb::LanguageType> langs = {});
TypeCategoryImpl(IFormatChangeListener *clist, ConstString name);
template <typename T> void ForEach(const ForEachCallbacks<T> &foreach) {
GetTypeFormatsContainer()->ForEach(foreach.GetFormatExactCallback());

View File

@ -13,18 +13,14 @@
using namespace lldb;
using namespace lldb_private;
TypeCategoryImpl::TypeCategoryImpl(
IFormatChangeListener *clist, ConstString name,
std::initializer_list<lldb::LanguageType> langs)
TypeCategoryImpl::TypeCategoryImpl(IFormatChangeListener *clist,
ConstString name)
: m_format_cont("format", "regex-format", clist),
m_summary_cont("summary", "regex-summary", clist),
m_filter_cont("filter", "regex-filter", clist),
m_synth_cont("synth", "regex-synth", clist),
m_validator_cont("validator", "regex-validator", clist), m_enabled(false),
m_change_listener(clist), m_mutex(), m_name(name), m_languages() {
for (const lldb::LanguageType lang : langs)
AddLanguage(lang);
}
m_change_listener(clist), m_mutex(), m_name(name), m_languages() {}
static bool IsApplicable(lldb::LanguageType category_lang,
lldb::LanguageType valobj_lang) {