diff options
| author | Dave Lee <davelee.com@gmail.com> | 2024-12-02 16:23:26 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-02 16:23:26 -0800 |
| commit | 0a96161beb161933e64e188bfb0754df494c3a58 (patch) | |
| tree | cdf8b83ad4d4e0e4c331290c33a06bb606061860 /lldb/source/DataFormatters/ValueObjectPrinter.cpp | |
| parent | b80a157d12ebeebb85fa0a1e53beb5b46dc16d36 (diff) | |
[lldb] Simplify DumpValueObjectOptions::PointerDepth (NFC) (#117504)
`Mode::Always` and `Mode::Default` are handled identically.
`Mode::Never` is the same as having a count of 0.
Diffstat (limited to 'lldb/source/DataFormatters/ValueObjectPrinter.cpp')
| -rw-r--r-- | lldb/source/DataFormatters/ValueObjectPrinter.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/lldb/source/DataFormatters/ValueObjectPrinter.cpp b/lldb/source/DataFormatters/ValueObjectPrinter.cpp index face38253efa..01e604e019f2 100644 --- a/lldb/source/DataFormatters/ValueObjectPrinter.cpp +++ b/lldb/source/DataFormatters/ValueObjectPrinter.cpp @@ -503,14 +503,7 @@ ValueObjectPrinter::PrintObjectDescriptionIfNeeded(bool value_printed, } bool DumpValueObjectOptions::PointerDepth::CanAllowExpansion() const { - switch (m_mode) { - case Mode::Always: - case Mode::Default: - return m_count > 0; - case Mode::Never: - return false; - } - return false; + return m_count > 0; } bool ValueObjectPrinter::ShouldPrintChildren( |
