summaryrefslogtreecommitdiffstats
path: root/lldb/source/DataFormatters/DataVisualization.cpp
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2013-10-04 23:14:13 +0000
committerEnrico Granata <egranata@apple.com>2013-10-04 23:14:13 +0000
commita29cb0bada725d47daa0006be1a847964b29e45e (patch)
tree05a98d9df302f53ddf17041714dc5a2c54314e0d /lldb/source/DataFormatters/DataVisualization.cpp
parent1f4f5d7b84034f0b9dae78f4c67ff59bff27d96c (diff)
downloadbcm5719-llvm-a29cb0bada725d47daa0006be1a847964b29e45e.tar.gz
bcm5719-llvm-a29cb0bada725d47daa0006be1a847964b29e45e.zip
<rdar://problem/12042982>
This radar extends the notion of one-liner summaries to automagically apply in a few interesting cases More specifically, this checkin changes the printout of ValueObjects to print on one-line (as if type summary add -c had been applied) iff: this ValueObject does not have a summary its children have no synthetic children its children are not a non-empty base class without a summary its children do not have a summary that asks for children to show up the aggregate length of all the names of all the children is <= 50 characters you did not ask to see the types during a printout your pointer depth is 0 This is meant to simplify the way LLDB shows data on screen for small structs and similarly compact data types (e.g. std::pair<int,int> anyone?) Feedback is especially welcome on how the feature feels and corner cases where we should apply this printout and don't (or viceversa, we are applying it when we shouldn't be) llvm-svn: 191996
Diffstat (limited to 'lldb/source/DataFormatters/DataVisualization.cpp')
-rw-r--r--lldb/source/DataFormatters/DataVisualization.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lldb/source/DataFormatters/DataVisualization.cpp b/lldb/source/DataFormatters/DataVisualization.cpp
index c1ef359049b..94447fc8ede 100644
--- a/lldb/source/DataFormatters/DataVisualization.cpp
+++ b/lldb/source/DataFormatters/DataVisualization.cpp
@@ -40,6 +40,12 @@ DataVisualization::GetCurrentRevision ()
return GetFormatManager().GetCurrentRevision();
}
+bool
+DataVisualization::ShouldPrintAsOneLiner (ValueObject& valobj)
+{
+ return GetFormatManager().ShouldPrintAsOneLiner(valobj);
+}
+
lldb::TypeFormatImplSP
DataVisualization::ValueFormats::GetFormat (ValueObject& valobj, lldb::DynamicValueType use_dynamic)
{
OpenPOWER on IntegriCloud