diff options
| -rw-r--r-- | lldb/include/lldb/Core/ValueObject.h | 9 | ||||
| -rw-r--r-- | lldb/source/Core/FormatEntity.cpp | 5 | ||||
| -rw-r--r-- | lldb/source/Core/ValueObject.cpp | 7 | ||||
| -rw-r--r-- | lldb/source/DataFormatters/ValueObjectPrinter.cpp | 2 | ||||
| -rw-r--r-- | lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp | 3 | ||||
| -rw-r--r-- | lldb/source/Plugins/Language/CPlusPlus/LibStdcpp.cpp | 3 | ||||
| -rw-r--r-- | lldb/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp | 2 |
7 files changed, 15 insertions, 16 deletions
diff --git a/lldb/include/lldb/Core/ValueObject.h b/lldb/include/lldb/Core/ValueObject.h index 60a6e30df3c..a68fd27eca4 100644 --- a/lldb/include/lldb/Core/ValueObject.h +++ b/lldb/include/lldb/Core/ValueObject.h @@ -536,10 +536,9 @@ public: ValueObjectRepresentationStyle val_obj_display, lldb::Format custom_format); - enum PrintableRepresentationSpecialCases { - ePrintableRepresentationSpecialCasesDisable = 0, - ePrintableRepresentationSpecialCasesAllow = 1, - ePrintableRepresentationSpecialCasesOnly = 3 + enum class PrintableRepresentationSpecialCases : bool { + eDisable = false, + eAllow = true }; bool @@ -548,7 +547,7 @@ public: eValueObjectRepresentationStyleSummary, lldb::Format custom_format = lldb::eFormatInvalid, PrintableRepresentationSpecialCases special = - ePrintableRepresentationSpecialCasesAllow, + PrintableRepresentationSpecialCases::eAllow, bool do_dump_error = true); bool GetValueIsValid() const; diff --git a/lldb/source/Core/FormatEntity.cpp b/lldb/source/Core/FormatEntity.cpp index f5eb4d497c2..f252ff55211 100644 --- a/lldb/source/Core/FormatEntity.cpp +++ b/lldb/source/Core/FormatEntity.cpp @@ -874,7 +874,7 @@ static bool DumpValue(Stream &s, const SymbolContext *sc, { target->DumpPrintableRepresentation( s, val_obj_display, custom_format, - ValueObject::ePrintableRepresentationSpecialCasesDisable); + ValueObject::PrintableRepresentationSpecialCases::eDisable); } return true; } @@ -1676,8 +1676,7 @@ bool FormatEntity::Format(const Entry &entry, Stream &s, ss, ValueObject::ValueObjectRepresentationStyle:: eValueObjectRepresentationStyleSummary, eFormatDefault, - ValueObject::PrintableRepresentationSpecialCases:: - ePrintableRepresentationSpecialCasesAllow, + ValueObject::PrintableRepresentationSpecialCases::eAllow, false); } diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp index 235f30595b5..edd549059b2 100644 --- a/lldb/source/Core/ValueObject.cpp +++ b/lldb/source/Core/ValueObject.cpp @@ -1279,10 +1279,9 @@ bool ValueObject::DumpPrintableRepresentation( Flags flags(GetTypeInfo()); - bool allow_special = ((special & ePrintableRepresentationSpecialCasesAllow) == - ePrintableRepresentationSpecialCasesAllow); - bool only_special = ((special & ePrintableRepresentationSpecialCasesOnly) == - ePrintableRepresentationSpecialCasesOnly); + bool allow_special = + (special == ValueObject::PrintableRepresentationSpecialCases::eAllow); + const bool only_special = false; if (allow_special) { if (flags.AnySet(eTypeIsArray | eTypeIsPointer) && diff --git a/lldb/source/DataFormatters/ValueObjectPrinter.cpp b/lldb/source/DataFormatters/ValueObjectPrinter.cpp index 53c87a7b157..9e66d8dfb2a 100644 --- a/lldb/source/DataFormatters/ValueObjectPrinter.cpp +++ b/lldb/source/DataFormatters/ValueObjectPrinter.cpp @@ -762,7 +762,7 @@ bool ValueObjectPrinter::PrintChildrenOneLiner(bool hide_names) { child_sp->DumpPrintableRepresentation( *m_stream, ValueObject::eValueObjectRepresentationStyleSummary, m_options.m_format, - ValueObject::ePrintableRepresentationSpecialCasesDisable); + ValueObject::PrintableRepresentationSpecialCases::eDisable); } } diff --git a/lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp b/lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp index 7303ae50f5b..a0b2304f21b 100644 --- a/lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp +++ b/lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp @@ -59,7 +59,8 @@ bool lldb_private::formatters::LibcxxSmartPointerSummaryProvider( if (pointee_sp->DumpPrintableRepresentation( stream, ValueObject::eValueObjectRepresentationStyleSummary, lldb::eFormatInvalid, - ValueObject::ePrintableRepresentationSpecialCasesDisable, false)) + ValueObject::PrintableRepresentationSpecialCases::eDisable, + false)) print_pointee = true; } if (!print_pointee) diff --git a/lldb/source/Plugins/Language/CPlusPlus/LibStdcpp.cpp b/lldb/source/Plugins/Language/CPlusPlus/LibStdcpp.cpp index 2215b9282e7..f931a8d6a04 100644 --- a/lldb/source/Plugins/Language/CPlusPlus/LibStdcpp.cpp +++ b/lldb/source/Plugins/Language/CPlusPlus/LibStdcpp.cpp @@ -420,7 +420,8 @@ bool lldb_private::formatters::LibStdcppSmartPointerSummaryProvider( if (pointee_sp->DumpPrintableRepresentation( stream, ValueObject::eValueObjectRepresentationStyleSummary, lldb::eFormatInvalid, - ValueObject::ePrintableRepresentationSpecialCasesDisable, false)) { + ValueObject::PrintableRepresentationSpecialCases::eDisable, + false)) { return true; } } diff --git a/lldb/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp b/lldb/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp index 16115f1be69..636819936b5 100644 --- a/lldb/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp +++ b/lldb/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp @@ -135,7 +135,7 @@ bool LibStdcppUniquePtrSyntheticFrontEnd::GetSummary( if (m_obj_obj->DumpPrintableRepresentation( stream, ValueObject::eValueObjectRepresentationStyleSummary, lldb::eFormatInvalid, - ValueObject::ePrintableRepresentationSpecialCasesDisable, + ValueObject::PrintableRepresentationSpecialCases::eDisable, false)) { print_pointee = true; } |

