summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2014-09-11 23:00:27 +0000
committerEnrico Granata <egranata@apple.com>2014-09-11 23:00:27 +0000
commit42fa4af8fe4e672d0b8bd4a5ebeec9b45730a0ff (patch)
treeec677bdefcc2a653fd8fd4d6b35a3d7ca504e9c3
parent56ab746c075fd07a69ac2c5dbb9c828e268880df (diff)
downloadbcm5719-llvm-42fa4af8fe4e672d0b8bd4a5ebeec9b45730a0ff.tar.gz
bcm5719-llvm-42fa4af8fe4e672d0b8bd4a5ebeec9b45730a0ff.zip
When deciding if one-liner printing applies, and you find a summary, the summary is a good candidate to ask. While in theory one could want one-liner printing with a non-one-liner summary, I don't see LLDB as the best place to solve such inner conflicts
llvm-svn: 217641
-rw-r--r--lldb/source/DataFormatters/FormatManager.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lldb/source/DataFormatters/FormatManager.cpp b/lldb/source/DataFormatters/FormatManager.cpp
index 7ccfcddd9c5..f7f17224e9a 100644
--- a/lldb/source/DataFormatters/FormatManager.cpp
+++ b/lldb/source/DataFormatters/FormatManager.cpp
@@ -527,10 +527,9 @@ FormatManager::ShouldPrintAsOneLiner (ValueObject& valobj)
if (valobj.GetTargetSP().get() && valobj.GetTargetSP()->GetDebugger().GetAutoOneLineSummaries() == false)
return false; // then don't oneline
- // if this object has a summary, don't try to do anything special to it
- // if the user wants one-liner, they can ask for it in summary :)
+ // if this object has a summary, then ask the summary
if (valobj.GetSummaryFormat().get() != nullptr)
- return false;
+ return valobj.GetSummaryFormat()->IsOneLiner();
// no children, no party
if (valobj.GetNumChildren() == 0)
OpenPOWER on IntegriCloud