summaryrefslogtreecommitdiffstats
path: root/lldb/source/DataFormatters/FormatManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/DataFormatters/FormatManager.cpp')
-rw-r--r--lldb/source/DataFormatters/FormatManager.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/lldb/source/DataFormatters/FormatManager.cpp b/lldb/source/DataFormatters/FormatManager.cpp
index 6d45a89f8d3..03368f2acd9 100644
--- a/lldb/source/DataFormatters/FormatManager.cpp
+++ b/lldb/source/DataFormatters/FormatManager.cpp
@@ -558,6 +558,23 @@ FormatManager::ShouldPrintAsOneLiner (ValueObject& valobj)
if (valobj.GetNumChildren() == 0)
return false;
+ // ask the type if it has any opinion about this
+ // eLazyBoolCalculate == no opinion; other values should be self explanatory
+ CompilerType compiler_type(valobj.GetCompilerType());
+ if (compiler_type.IsValid())
+ {
+ switch (compiler_type.ShouldPrintAsOneLiner())
+ {
+ case eLazyBoolNo:
+ return false;
+ case eLazyBoolYes:
+ return true;
+ case eLazyBoolCalculate:
+ default:
+ break;
+ }
+ }
+
size_t total_children_name_len = 0;
for (size_t idx = 0;
OpenPOWER on IntegriCloud