diff options
author | Enrico Granata <egranata@apple.com> | 2015-10-29 22:18:05 +0000 |
---|---|---|
committer | Enrico Granata <egranata@apple.com> | 2015-10-29 22:18:05 +0000 |
commit | 9eeabff0b546904645a4f286f9816a8399da1dad (patch) | |
tree | b6c7b83f9df3c27996fd18ce67d78b32ba511f9d /lldb/source/DataFormatters/DataVisualization.cpp | |
parent | ca56a72af99782a85353f85ed8edc667c37e8108 (diff) | |
download | bcm5719-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.cpp | 8 |
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) { |