summaryrefslogtreecommitdiffstats
path: root/lldb/source/DataFormatters/DataVisualization.cpp
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2015-09-04 22:07:48 +0000
committerEnrico Granata <egranata@apple.com>2015-09-04 22:07:48 +0000
commit964211f25ffa3f6057b61828cad013d36ebc02e5 (patch)
treea4ce859b029a6d9a445daba505ee1377b541e78b /lldb/source/DataFormatters/DataVisualization.cpp
parent0e2b975eb6814eced739aacd8baa6051dc7b171a (diff)
downloadbcm5719-llvm-964211f25ffa3f6057b61828cad013d36ebc02e5.tar.gz
bcm5719-llvm-964211f25ffa3f6057b61828cad013d36ebc02e5.zip
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
Diffstat (limited to 'lldb/source/DataFormatters/DataVisualization.cpp')
-rw-r--r--lldb/source/DataFormatters/DataVisualization.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/lldb/source/DataFormatters/DataVisualization.cpp b/lldb/source/DataFormatters/DataVisualization.cpp
index 361254185b3..16e600201d2 100644
--- a/lldb/source/DataFormatters/DataVisualization.cpp
+++ b/lldb/source/DataFormatters/DataVisualization.cpp
@@ -168,6 +168,13 @@ DataVisualization::Categories::Enable (const ConstString& category,
}
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)
{
if (GetFormatManager().GetCategory(category)->IsEnabled() == true)
@@ -175,6 +182,13 @@ DataVisualization::Categories::Disable (const ConstString& 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)
{
OpenPOWER on IntegriCloud