Remove some dead code from DumpValueObjectOptions::PointerDepth

llvm-svn: 298189
This commit is contained in:
Tamas Berghammer
2017-03-18 17:33:00 +00:00
parent 06329a98e3
commit e4e17b8ce4
2 changed files with 3 additions and 28 deletions

View File

@@ -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());