[Lldb-commits] [lldb] r217641 - 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

Enrico Granata egranata at apple.com
Thu Sep 11 16:00:27 PDT 2014


Author: enrico
Date: Thu Sep 11 18:00:27 2014
New Revision: 217641

URL: http://llvm.org/viewvc/llvm-project?rev=217641&view=rev
Log:
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

Modified:
    lldb/trunk/source/DataFormatters/FormatManager.cpp

Modified: lldb/trunk/source/DataFormatters/FormatManager.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/FormatManager.cpp?rev=217641&r1=217640&r2=217641&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/FormatManager.cpp (original)
+++ lldb/trunk/source/DataFormatters/FormatManager.cpp Thu Sep 11 18:00:27 2014
@@ -527,10 +527,9 @@ FormatManager::ShouldPrintAsOneLiner (Va
     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)





More information about the lldb-commits mailing list