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
This commit is contained in:
Enrico Granata
2015-10-29 22:18:05 +00:00
parent ca56a72af9
commit 9eeabff0b5
3 changed files with 100 additions and 25 deletions

View File

@@ -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)
{