augusto2112 updated this revision to Diff 527670.
augusto2112 added a comment.
Herald added a subscriber: JDevlieghere.
Add radar
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151950/new/
https://reviews.llvm.org/D151950
Files:
lldb/source/DataFormatters/ValueObjectPrinter.cpp
Index: lldb/source/DataFormatters/ValueObjectPrinter.cpp
===================================================================
--- lldb/source/DataFormatters/ValueObjectPrinter.cpp
+++ lldb/source/DataFormatters/ValueObjectPrinter.cpp
@@ -590,7 +590,7 @@
void ValueObjectPrinter::PrintChild(
ValueObjectSP child_sp,
const DumpValueObjectOptions::PointerDepth &curr_ptr_depth) {
- const uint32_t consumed_depth = (!m_options.m_pointer_as_array) ? 1 : 0;
+ const uint32_t consumed_depth = m_options.m_pointer_as_array ? 0 : 1;
const bool does_consume_ptr_depth =
((IsPtr() && !m_options.m_pointer_as_array) || IsRef());
@@ -611,7 +611,7 @@
ValueObjectPrinter child_printer(
child_sp.get(), m_stream, child_options,
does_consume_ptr_depth ? --curr_ptr_depth : curr_ptr_depth,
- m_curr_depth + consumed_depth, m_printed_instance_pointers);
+ m_curr_depth + 1, m_printed_instance_pointers);
child_printer.PrintValueObject();
}
}
Index: lldb/source/DataFormatters/ValueObjectPrinter.cpp
===================================================================
--- lldb/source/DataFormatters/ValueObjectPrinter.cpp
+++ lldb/source/DataFormatters/ValueObjectPrinter.cpp
@@ -590,7 +590,7 @@
void ValueObjectPrinter::PrintChild(
ValueObjectSP child_sp,
const DumpValueObjectOptions::PointerDepth &curr_ptr_depth) {
- const uint32_t consumed_depth = (!m_options.m_pointer_as_array) ? 1 : 0;
+ const uint32_t consumed_depth = m_options.m_pointer_as_array ? 0 : 1;
const bool does_consume_ptr_depth =
((IsPtr() && !m_options.m_pointer_as_array) || IsRef());
@@ -611,7 +611,7 @@
ValueObjectPrinter child_printer(
child_sp.get(), m_stream, child_options,
does_consume_ptr_depth ? --curr_ptr_depth : curr_ptr_depth,
- m_curr_depth + consumed_depth, m_printed_instance_pointers);
+ m_curr_depth + 1, m_printed_instance_pointers);
child_printer.PrintValueObject();
}
}
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits