summaryrefslogtreecommitdiffstats
path: root/lldb/source/DataFormatters
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2013-10-23 01:34:31 +0000
committerEnrico Granata <egranata@apple.com>2013-10-23 01:34:31 +0000
commitc89e4ca3c181b907562afa3e88be74366cf65bd2 (patch)
treefe2e09af71d4b79ad0ade1a64e27c748e77cc089 /lldb/source/DataFormatters
parent133ac8714da666dc999361bbca0b365ce8a8c4c2 (diff)
downloadbcm5719-llvm-c89e4ca3c181b907562afa3e88be74366cf65bd2.tar.gz
bcm5719-llvm-c89e4ca3c181b907562afa3e88be74366cf65bd2.zip
One should actually not do one-line printing of nested aggregates even if they are not the base class
This check was overly strict. Relax it. While one could conceivably want nested one-lining: (Foo) aFoo = (x = 1, y = (t = 3, q = “Hello), z = 3.14) the spirit of this feature is mostly to make *SMALL LINEAR* structs come out more compact. Aggregates with children and no summary for now just disable the one-lining. Define a one-liner summary to override :) llvm-svn: 193218
Diffstat (limited to 'lldb/source/DataFormatters')
-rw-r--r--lldb/source/DataFormatters/FormatManager.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/lldb/source/DataFormatters/FormatManager.cpp b/lldb/source/DataFormatters/FormatManager.cpp
index 622dc00dfe4..c4540b5210c 100644
--- a/lldb/source/DataFormatters/FormatManager.cpp
+++ b/lldb/source/DataFormatters/FormatManager.cpp
@@ -374,18 +374,14 @@ FormatManager::ShouldPrintAsOneLiner (ValueObject& valobj)
return false;
}
- // if there is a base-class...
- if (child_sp->IsBaseClass())
+ // if this child has children..
+ if (child_sp->GetNumChildren())
{
- // and it has children..
- if (child_sp->GetNumChildren())
- {
- // ...and no summary...
- // (if it had a summary and the summary wanted children, we would have bailed out anyway
- // so this only makes us bail out if this has no summary and we would then print children)
- if (!child_sp->GetSummaryFormat())
- return false; // then bail out
- }
+ // ...and no summary...
+ // (if it had a summary and the summary wanted children, we would have bailed out anyway
+ // so this only makes us bail out if this has no summary and we would then print children)
+ if (!child_sp->GetSummaryFormat())
+ return false; // then bail out
}
}
return true;
OpenPOWER on IntegriCloud