summaryrefslogtreecommitdiffstats
path: root/lldb/source/DataFormatters/ValueObjectPrinter.cpp
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2013-10-05 00:20:27 +0000
committerEnrico Granata <egranata@apple.com>2013-10-05 00:20:27 +0000
commit938d1d67e87f2a35e755beb3b48b4773237a32e4 (patch)
tree7c55e25680b94b2d10ad9b70128be9125aa7f1d6 /lldb/source/DataFormatters/ValueObjectPrinter.cpp
parent68a26105200dcf8efda329d7b26811c20ca145ce (diff)
downloadbcm5719-llvm-938d1d67e87f2a35e755beb3b48b4773237a32e4.tar.gz
bcm5719-llvm-938d1d67e87f2a35e755beb3b48b4773237a32e4.zip
Cleaner way to work around the lack of delegating constructors on some versions of GCC
llvm-svn: 192013
Diffstat (limited to 'lldb/source/DataFormatters/ValueObjectPrinter.cpp')
-rw-r--r--lldb/source/DataFormatters/ValueObjectPrinter.cpp67
1 files changed, 32 insertions, 35 deletions
diff --git a/lldb/source/DataFormatters/ValueObjectPrinter.cpp b/lldb/source/DataFormatters/ValueObjectPrinter.cpp
index 7da5450bcd2..1cc10cb882a 100644
--- a/lldb/source/DataFormatters/ValueObjectPrinter.cpp
+++ b/lldb/source/DataFormatters/ValueObjectPrinter.cpp
@@ -23,48 +23,45 @@ using namespace lldb_private;
ValueObjectPrinter::ValueObjectPrinter (ValueObject* valobj,
Stream* s,
- const DumpValueObjectOptions& options) :
- m_orig_valobj(valobj),
- m_valobj(nullptr),
- m_stream(s),
- options(options),
- m_ptr_depth(options.m_max_ptr_depth),
- m_curr_depth(0),
- m_should_print(eLazyBoolCalculate),
- m_is_nil(eLazyBoolCalculate),
- m_is_ptr(eLazyBoolCalculate),
- m_is_ref(eLazyBoolCalculate),
- m_is_aggregate(eLazyBoolCalculate),
- m_summary_formatter({nullptr,false}),
- m_value(),
- m_summary(),
- m_error()
+ const DumpValueObjectOptions& options)
{
- assert (m_orig_valobj && "cannot print a NULL ValueObject");
- assert (m_stream && "cannot print to a NULL Stream");
+ Init(valobj,s,options,options.m_max_ptr_depth,0);
}
ValueObjectPrinter::ValueObjectPrinter (ValueObject* valobj,
Stream* s,
const DumpValueObjectOptions& options,
uint32_t ptr_depth,
- uint32_t curr_depth) :
- m_orig_valobj(valobj),
- m_valobj(nullptr),
- m_stream(s),
- options(options),
- m_ptr_depth(ptr_depth),
- m_curr_depth(curr_depth),
- m_should_print(eLazyBoolCalculate),
- m_is_nil(eLazyBoolCalculate),
- m_is_ptr(eLazyBoolCalculate),
- m_is_ref(eLazyBoolCalculate),
- m_is_aggregate(eLazyBoolCalculate),
- m_summary_formatter({nullptr,false}),
- m_value(),
- m_summary(),
- m_error()
-{ }
+ uint32_t curr_depth)
+{
+ Init(valobj,s,options,ptr_depth,curr_depth);
+}
+
+void
+ValueObjectPrinter::Init (ValueObject* valobj,
+ Stream* s,
+ const DumpValueObjectOptions& options,
+ uint32_t ptr_depth,
+ uint32_t curr_depth)
+{
+ m_orig_valobj = valobj;
+ m_valobj = nullptr;
+ m_stream = s;
+ this->options = options;
+ m_ptr_depth = ptr_depth;
+ m_curr_depth = curr_depth;
+ assert (m_orig_valobj && "cannot print a NULL ValueObject");
+ assert (m_stream && "cannot print to a NULL Stream");
+ m_should_print = eLazyBoolCalculate;
+ m_is_nil = eLazyBoolCalculate;
+ m_is_ptr = eLazyBoolCalculate;
+ m_is_ref = eLazyBoolCalculate;
+ m_is_aggregate = eLazyBoolCalculate;
+ m_summary_formatter = {nullptr,false};
+ m_value.assign("");
+ m_summary.assign("");
+ m_error.assign("");
+}
bool
ValueObjectPrinter::PrintValueObject ()
OpenPOWER on IntegriCloud