Fixing a problem with the NSSet summary provider; plus, providing a further optimization to the whole Cocoa formatters infrastructure

llvm-svn: 152423
This commit is contained in:
Enrico Granata 2012-03-09 19:04:53 +00:00
parent 3a08300585
commit 332b0b9a2f
2 changed files with 6 additions and 2 deletions

View File

@ -189,7 +189,7 @@ def GetSummary_Impl(valobj):
wrapper = NSCountedSet_SummaryProvider(valobj, class_data.sys_params)
statistics.metric_hit('code_notrun',valobj)
else:
wrapper = NSSetUnknown_SummaryProvider(valobj)
wrapper = NSSetUnknown_SummaryProvider(valobj, class_data.sys_params)
statistics.metric_hit('unknown_class',str(valobj) + " seen as " + name_string)
return wrapper;

View File

@ -6,7 +6,11 @@ class Counter:
self.list = []
def update(self,name):
self.count = self.count + 1
self.list.append(str(name))
# avoid getting the full dump of this ValueObject just to save its metrics
if isinstance(name,lldb.SBValue):
self.list.append(name.GetName())
else:
self.list.append(str(name))
def __str__(self):
return str(self.count) + " times, for items [" + str(self.list) + "]"