[Lldb-commits] [lldb] r298189 - Remove some dead code from DumpValueObjectOptions::PointerDepth
Sean Callanan via lldb-commits
lldb-commits at lists.llvm.org
Wed Mar 29 17:40:28 PDT 2017
This is not dead code in Swift-enabled LLDB, as I just found out doing a merge. I'm going to use Default and see what breaks.
Sean
> On Mar 18, 2017, at 10:33 AM, Tamas Berghammer via lldb-commits <lldb-commits at lists.llvm.org> wrote:
>
> Author: tberghammer
> Date: Sat Mar 18 12:33:00 2017
> New Revision: 298189
>
> URL: http://llvm.org/viewvc/llvm-project?rev=298189&view=rev
> Log:
> Remove some dead code from DumpValueObjectOptions::PointerDepth
>
> Modified:
> lldb/trunk/include/lldb/DataFormatters/DumpValueObjectOptions.h
> lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp
>
> Modified: lldb/trunk/include/lldb/DataFormatters/DumpValueObjectOptions.h
> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/DataFormatters/DumpValueObjectOptions.h?rev=298189&r1=298188&r2=298189&view=diff
> ==============================================================================
> --- lldb/trunk/include/lldb/DataFormatters/DumpValueObjectOptions.h (original)
> +++ lldb/trunk/include/lldb/DataFormatters/DumpValueObjectOptions.h Sat Mar 18 12:33:00 2017
> @@ -27,7 +27,7 @@ namespace lldb_private {
> class DumpValueObjectOptions {
> public:
> struct PointerDepth {
> - enum class Mode { Always, Formatters, Default, Never } m_mode;
> + enum class Mode { Always, Default, Never } m_mode;
> uint32_t m_count;
>
> PointerDepth operator--() const {
> @@ -37,9 +37,6 @@ public:
> }
>
> bool CanAllowExpansion() const;
> -
> - bool CanAllowExpansion(bool is_root, TypeSummaryImpl *entry,
> - ValueObject *valobj, const std::string &summary);
> };
>
> struct PointerAsArraySettings {
>
> Modified: lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp
> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp?rev=298189&r1=298188&r2=298189&view=diff
> ==============================================================================
> --- lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp (original)
> +++ lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp Sat Mar 18 12:33:00 2017
> @@ -468,32 +468,11 @@ bool ValueObjectPrinter::PrintObjectDesc
> 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::ShouldPrintChil
> 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());
>
>
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
More information about the lldb-commits
mailing list