From 8037fa4ee916fa20b3c63cbf531f4ee7e1c76138 Mon Sep 17 00:00:00 2001 From: emaste Date: Fri, 3 Jul 2015 16:57:06 +0000 Subject: Import LLDB as of upstream SVN 241361 (git 612c075f) --- source/Interpreter/OptionValueArray.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'source/Interpreter/OptionValueArray.cpp') diff --git a/source/Interpreter/OptionValueArray.cpp b/source/Interpreter/OptionValueArray.cpp index 86d49c9..aabe457 100644 --- a/source/Interpreter/OptionValueArray.cpp +++ b/source/Interpreter/OptionValueArray.cpp @@ -74,11 +74,13 @@ OptionValueArray::DumpValue (const ExecutionContext *exe_ctx, Stream &strm, uint } Error -OptionValueArray::SetValueFromCString (const char *value, VarSetOperationType op) +OptionValueArray::SetValueFromString (llvm::StringRef value, VarSetOperationType op) { - Args args(value); - NotifyValueChanged(); - return SetArgs (args, op); + Args args(value.str().c_str()); + Error error = SetArgs (args, op); + if (error.Success()) + NotifyValueChanged(); + return error; } @@ -342,6 +344,8 @@ OptionValueArray::DeepCopy () const { OptionValueArray *copied_array = new OptionValueArray (m_type_mask, m_raw_value_dump); lldb::OptionValueSP copied_value_sp(copied_array); + *static_cast(copied_array) = *this; + copied_array->m_callback = m_callback; const uint32_t size = m_values.size(); for (uint32_t i = 0; i