summaryrefslogtreecommitdiffstats
path: root/lldb/source/DataFormatters/DataVisualization.cpp
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2015-10-29 22:18:05 +0000
committerEnrico Granata <egranata@apple.com>2015-10-29 22:18:05 +0000
commit9eeabff0b546904645a4f286f9816a8399da1dad (patch)
treeb6c7b83f9df3c27996fd18ce67d78b32ba511f9d /lldb/source/DataFormatters/DataVisualization.cpp
parentca56a72af99782a85353f85ed8edc667c37e8108 (diff)
downloadbcm5719-llvm-9eeabff0b546904645a4f286f9816a8399da1dad.tar.gz
bcm5719-llvm-9eeabff0b546904645a4f286f9816a8399da1dad.zip
Add a --language (-l) option to the formatter delete commands in order to allow removing formatters from language categories
This is slightly harder to test because formatters cannot be added to language categories, so deletions are irreversible (in a debugger run) I plan to add a test case soon, but I need to think about the right approach to obtain one llvm-svn: 251660
Diffstat (limited to 'lldb/source/DataFormatters/DataVisualization.cpp')
-rw-r--r--lldb/source/DataFormatters/DataVisualization.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lldb/source/DataFormatters/DataVisualization.cpp b/lldb/source/DataFormatters/DataVisualization.cpp
index 071b89d68d3..440091d1ed6 100644
--- a/lldb/source/DataFormatters/DataVisualization.cpp
+++ b/lldb/source/DataFormatters/DataVisualization.cpp
@@ -131,6 +131,14 @@ DataVisualization::Categories::GetCategory (const ConstString &category, lldb::T
return (entry.get() != NULL);
}
+bool
+DataVisualization::Categories::GetCategory (lldb::LanguageType language, lldb::TypeCategoryImplSP &entry)
+{
+ if (LanguageCategory *lang_category = GetFormatManager().GetCategoryForLanguage(language))
+ entry = lang_category->GetCategory();
+ return (entry.get() != nullptr);
+}
+
void
DataVisualization::Categories::Add (const ConstString &category)
{
OpenPOWER on IntegriCloud