forked from OSchip/llvm-project
[FormatManager] Provide only one variant of EnableCategory.
All the callers pass a single language anyway.
This commit is contained in:
parent
89618a7ce1
commit
0cfb4a6b3d
|
@ -52,23 +52,14 @@ public:
|
|||
void
|
||||
EnableCategory(ConstString category_name,
|
||||
TypeCategoryMap::Position pos = TypeCategoryMap::Default) {
|
||||
EnableCategory(category_name, pos,
|
||||
std::initializer_list<lldb::LanguageType>());
|
||||
EnableCategory(category_name, pos, {});
|
||||
}
|
||||
|
||||
void EnableCategory(ConstString category_name,
|
||||
TypeCategoryMap::Position pos, lldb::LanguageType lang) {
|
||||
std::initializer_list<lldb::LanguageType> langs = {lang};
|
||||
EnableCategory(category_name, pos, langs);
|
||||
}
|
||||
|
||||
void EnableCategory(ConstString category_name,
|
||||
TypeCategoryMap::Position pos = TypeCategoryMap::Default,
|
||||
std::initializer_list<lldb::LanguageType> langs = {}) {
|
||||
TypeCategoryMap::ValueSP category_sp;
|
||||
if (m_categories_map.Get(category_name, category_sp) && category_sp) {
|
||||
m_categories_map.Enable(category_sp, pos);
|
||||
for (const lldb::LanguageType lang : langs)
|
||||
category_sp->AddLanguage(lang);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue