diff options
Diffstat (limited to 'lldb/source/DataFormatters')
-rw-r--r-- | lldb/source/DataFormatters/FormatManager.cpp | 6 | ||||
-rw-r--r-- | lldb/source/DataFormatters/ValueObjectPrinter.cpp | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/lldb/source/DataFormatters/FormatManager.cpp b/lldb/source/DataFormatters/FormatManager.cpp index 9fe89b187bf..f3146b99f0c 100644 --- a/lldb/source/DataFormatters/FormatManager.cpp +++ b/lldb/source/DataFormatters/FormatManager.cpp @@ -185,7 +185,11 @@ FormatManager::GetPossibleMatches (ValueObject& valobj, reason |= lldb_private::eFormatterChoiceCriterionStrippedBitField; } entries.push_back({type_name,reason,did_strip_ptr,did_strip_ref,did_strip_typedef}); - + + ConstString display_type_name(clang_type.GetDisplayTypeName()); + if (display_type_name != type_name) + entries.push_back({display_type_name,reason,did_strip_ptr,did_strip_ref,did_strip_typedef}); + for (bool is_rvalue_ref = true, j = true; j && clang_type.IsReferenceType(nullptr, &is_rvalue_ref); j = false) { ClangASTType non_ref_type = clang_type.GetNonReferenceType(); diff --git a/lldb/source/DataFormatters/ValueObjectPrinter.cpp b/lldb/source/DataFormatters/ValueObjectPrinter.cpp index 565d4d419da..65e5e3f4582 100644 --- a/lldb/source/DataFormatters/ValueObjectPrinter.cpp +++ b/lldb/source/DataFormatters/ValueObjectPrinter.cpp @@ -222,7 +222,11 @@ ValueObjectPrinter::PrintTypeIfNeeded () { // Some ValueObjects don't have types (like registers sets). Only print // the type if there is one to print - ConstString qualified_type_name(m_valobj->GetQualifiedTypeName()); + ConstString qualified_type_name; + if (options.m_be_raw) + qualified_type_name = m_valobj->GetQualifiedTypeName(); + else + qualified_type_name = m_valobj->GetDisplayTypeName(); if (qualified_type_name) m_stream->Printf("(%s) ", qualified_type_name.GetCString()); else |