Make LLDB print out an explicit marker when it's displaying formatters that are part of a disabled category

Fixes rdar://26202006

llvm-svn: 269673
This commit is contained in:
Enrico Granata 2016-05-16 17:27:26 +00:00
parent 595b969c67
commit 429e1f9b1d
2 changed files with 5 additions and 1 deletions

View File

@ -62,6 +62,8 @@ class DataFormatterDisablingTestCase(TestBase):
self.expect('frame variable string1', matching=False, substrs = ['hello world'])
self.expect('type summary list', substrs=['Category: system (disabled)'])
self.expect('type category list', substrs = ['system','disabled',])
# now enable and check that we are back to normal

View File

@ -1351,7 +1351,9 @@ protected:
bool any_printed = false;
auto category_closure = [&result, &formatter_regex, &any_printed] (const lldb::TypeCategoryImplSP& category) -> void {
result.GetOutputStream().Printf("-----------------------\nCategory: %s\n-----------------------\n", category->GetName());
result.GetOutputStream().Printf("-----------------------\nCategory: %s%s\n-----------------------\n",
category->GetName(),
category->IsEnabled() ? "" : " (disabled)");
TypeCategoryImpl::ForEachCallbacks<FormatterType> foreach;
foreach.SetExact([&result, &formatter_regex, &any_printed] (ConstString name, const FormatterSharedPointer& format_sp) -> bool {