Allow CompilerType to express a vote on whether oneliner printing should happen

llvm-svn: 248363
diff --git a/lldb/source/DataFormatters/FormatManager.cpp b/lldb/source/DataFormatters/FormatManager.cpp
index 6d45a89..03368f2 100644
--- a/lldb/source/DataFormatters/FormatManager.cpp
+++ b/lldb/source/DataFormatters/FormatManager.cpp
@@ -558,6 +558,23 @@
     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;