Skip to content

Commit a32c9d9

Browse files
committed
Fixup some Swift specific code in ValueObjectPrinter.
I changed llvm.org to not pass as pointers values that cannot be null, but there were a couple swift specific usages that also need fixing.
1 parent 1a5b261 commit a32c9d9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lldb/include/lldb/DataFormatters/DumpValueObjectOptions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class DumpValueObjectOptions {
3434
bool CanAllowExpansion() const;
3535

3636
bool CanAllowExpansion(bool is_root, TypeSummaryImpl *entry,
37-
ValueObject *valobj, const std::string &summary);
37+
ValueObject &valobj, const std::string &summary);
3838
};
3939

4040
struct PointerAsArraySettings {

lldb/source/DataFormatters/ValueObjectPrinter.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ bool ValueObjectPrinter::PrintObjectDescriptionIfNeeded(bool value_printed,
492492
}
493493

494494
bool DumpValueObjectOptions::PointerDepth::CanAllowExpansion(
495-
bool is_root, TypeSummaryImpl *entry, ValueObject *valobj,
495+
bool is_root, TypeSummaryImpl *entry, ValueObject &valobj,
496496
const std::string &summary) {
497497
switch (m_mode) {
498498
case Mode::Always:
@@ -504,7 +504,7 @@ bool DumpValueObjectOptions::PointerDepth::CanAllowExpansion(
504504
m_count = std::min<decltype(m_count)>(m_count, 1);
505505
return m_count > 0;
506506
case Mode::Formatters:
507-
if (!entry || entry->DoesPrintChildren(valobj) || summary.empty())
507+
if (!entry || entry->DoesPrintChildren(&valobj) || summary.empty())
508508
return m_count > 0;
509509
return false;
510510
}
@@ -574,7 +574,7 @@ bool ValueObjectPrinter::ShouldPrintChildren(
574574
}
575575

576576
TypeSummaryImpl *entry = GetSummaryFormatter();
577-
return curr_ptr_depth.CanAllowExpansion(false, entry, m_valobj, m_summary);
577+
return curr_ptr_depth.CanAllowExpansion(false, entry, valobj, m_summary);
578578
}
579579

580580
return print_children || m_summary.empty();

0 commit comments

Comments
 (0)