[Lldb-commits] [lldb] 0cfb4a6 - [FormatManager] Provide only one variant of EnableCategory.

Davide Italiano via lldb-commits lldb-commits at lists.llvm.org
Tue Dec 3 15:03:35 PST 2019


Author: Davide Italiano
Date: 2019-12-03T15:03:25-08:00
New Revision: 0cfb4a6b3d9556c8fc55766bce47cbb433ff19fe

URL: https://github.com/llvm/llvm-project/commit/0cfb4a6b3d9556c8fc55766bce47cbb433ff19fe
DIFF: https://github.com/llvm/llvm-project/commit/0cfb4a6b3d9556c8fc55766bce47cbb433ff19fe.diff

LOG: [FormatManager] Provide only one variant of EnableCategory.

All the callers pass a single language anyway.

Added: 
    

Modified: 
    lldb/include/lldb/DataFormatters/FormatManager.h

Removed: 
    


################################################################################
diff  --git a/lldb/include/lldb/DataFormatters/FormatManager.h b/lldb/include/lldb/DataFormatters/FormatManager.h
index afaafda47e76..66df8397dfee 100644
--- a/lldb/include/lldb/DataFormatters/FormatManager.h
+++ b/lldb/include/lldb/DataFormatters/FormatManager.h
@@ -52,24 +52,15 @@ class FormatManager : public IFormatChangeListener {
   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);
+      category_sp->AddLanguage(lang);
     }
   }
 


        


More information about the lldb-commits mailing list