Remove some dead code from DumpValueObjectOptions::PointerDepth
llvm-svn: 298189
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user