Add a --language (-l) option to type category {enable|disable} to allow people to turn on and off formatters for a given language

llvm-svn: 246884
This commit is contained in:
Enrico Granata
2015-09-04 22:07:48 +00:00
parent 0e2b975eb6
commit 964211f25f
5 changed files with 191 additions and 19 deletions

View File

@@ -167,6 +167,13 @@ DataVisualization::Categories::Enable (const ConstString& category,
GetFormatManager().EnableCategory(category, pos);
}
void
DataVisualization::Categories::Enable (lldb::LanguageType lang_type)
{
if (LanguageCategory* lang_category = GetFormatManager().GetCategoryForLanguage(lang_type))
lang_category->Enable();
}
void
DataVisualization::Categories::Disable (const ConstString& category)
{
@@ -174,6 +181,13 @@ DataVisualization::Categories::Disable (const ConstString& category)
GetFormatManager().DisableCategory(category);
}
void
DataVisualization::Categories::Disable (lldb::LanguageType lang_type)
{
if (LanguageCategory* lang_category = GetFormatManager().GetCategoryForLanguage(lang_type))
lang_category->Disable();
}
void
DataVisualization::Categories::Enable (const lldb::TypeCategoryImplSP& category,
TypeCategoryMap::Position pos)