diff options
| author | Tamas Berghammer <tberghammer@google.com> | 2017-03-18 17:33:00 +0000 |
|---|---|---|
| committer | Tamas Berghammer <tberghammer@google.com> | 2017-03-18 17:33:00 +0000 |
| commit | e4e17b8ce46ab38802f3918de34db8a94dfed2c4 (patch) | |
| tree | 7ce804e121132012ac4da823270142d1e7d18342 /lldb/source/DataFormatters/ValueObjectPrinter.cpp | |
| parent | 06329a98e3e9ede5456b33ecc9d12b8271492c43 (diff) | |
| download | bcm5719-llvm-e4e17b8ce46ab38802f3918de34db8a94dfed2c4.tar.gz bcm5719-llvm-e4e17b8ce46ab38802f3918de34db8a94dfed2c4.zip | |
Remove some dead code from DumpValueObjectOptions::PointerDepth
llvm-svn: 298189
Diffstat (limited to 'lldb/source/DataFormatters/ValueObjectPrinter.cpp')
| -rw-r--r-- | lldb/source/DataFormatters/ValueObjectPrinter.cpp | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/lldb/source/DataFormatters/ValueObjectPrinter.cpp b/lldb/source/DataFormatters/ValueObjectPrinter.cpp index 0c6a3b600fc..173050b4691 100644 --- a/lldb/source/DataFormatters/ValueObjectPrinter.cpp +++ b/lldb/source/DataFormatters/ValueObjectPrinter.cpp @@ -468,32 +468,11 @@ bool ValueObjectPrinter::PrintObjectDescriptionIfNeeded(bool value_printed, return true; } -bool DumpValueObjectOptions::PointerDepth::CanAllowExpansion( - bool is_root, TypeSummaryImpl *entry, ValueObject *valobj, - const std::string &summary) { - switch (m_mode) { - case Mode::Always: - return (m_count > 0); - case Mode::Never: - return false; - case Mode::Default: - if (is_root) - m_count = std::min<decltype(m_count)>(m_count, 1); - return m_count > 0; - case Mode::Formatters: - if (!entry || entry->DoesPrintChildren(valobj) || summary.empty()) - return m_count > 0; - return false; - } - return false; -} - bool DumpValueObjectOptions::PointerDepth::CanAllowExpansion() const { switch (m_mode) { case Mode::Always: case Mode::Default: - case Mode::Formatters: - return (m_count > 0); + return m_count > 0; case Mode::Never: return false; } @@ -546,8 +525,7 @@ bool ValueObjectPrinter::ShouldPrintChildren( return true; } - return curr_ptr_depth.CanAllowExpansion(false, entry, m_valobj, - m_summary); + return curr_ptr_depth.CanAllowExpansion(); } return (!entry || entry->DoesPrintChildren(m_valobj) || m_summary.empty()); |

