diff options
author | Enrico Granata <egranata@apple.com> | 2015-09-23 02:04:34 +0000 |
---|---|---|
committer | Enrico Granata <egranata@apple.com> | 2015-09-23 02:04:34 +0000 |
commit | 9c63f99a130761e24eb5fe8df5c6cd561edadf06 (patch) | |
tree | 668bd02a3f0d52b690847ad5a221afffb61cccb5 /lldb/source/DataFormatters | |
parent | 2aacc0eccad6e0fee98ad28d9c885791926cf004 (diff) | |
download | bcm5719-llvm-9c63f99a130761e24eb5fe8df5c6cd561edadf06.tar.gz bcm5719-llvm-9c63f99a130761e24eb5fe8df5c6cd561edadf06.zip |
Allow CompilerType to express a vote on whether oneliner printing should happen
llvm-svn: 248363
Diffstat (limited to 'lldb/source/DataFormatters')
-rw-r--r-- | lldb/source/DataFormatters/FormatManager.cpp | 17 |
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; |