diff options
| author | Adrian Prantl <aprantl@apple.com> | 2018-12-19 23:48:40 +0000 |
|---|---|---|
| committer | Adrian Prantl <aprantl@apple.com> | 2018-12-19 23:48:40 +0000 |
| commit | 03bd18388383fa5e09a912085070f0f1e2608cab (patch) | |
| tree | cc871e4b98fb8701783181dcb96ad61b802ab9dc /lldb/source/Core/ValueObjectChild.cpp | |
| parent | f762a9f8f0b95db3ec2e7ff9e17e8663df64b579 (diff) | |
| download | bcm5719-llvm-03bd18388383fa5e09a912085070f0f1e2608cab.tar.gz bcm5719-llvm-03bd18388383fa5e09a912085070f0f1e2608cab.zip | |
Simplify code for readability. (NFC)
llvm-svn: 349700
Diffstat (limited to 'lldb/source/Core/ValueObjectChild.cpp')
| -rw-r--r-- | lldb/source/Core/ValueObjectChild.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lldb/source/Core/ValueObjectChild.cpp b/lldb/source/Core/ValueObjectChild.cpp index 7255eed5936..0f7be8317de 100644 --- a/lldb/source/Core/ValueObjectChild.cpp +++ b/lldb/source/Core/ValueObjectChild.cpp @@ -202,12 +202,9 @@ bool ValueObjectChild::UpdateValue() { ExecutionContext exe_ctx( GetExecutionContextRef().Lock(thread_and_frame_only_if_stopped)); if (GetCompilerType().GetTypeInfo() & lldb::eTypeHasValue) { - if (!is_instance_ptr_base) - m_error = - m_value.GetValueAsData(&exe_ctx, m_data, 0, GetModule().get()); - else - m_error = m_parent->GetValue().GetValueAsData(&exe_ctx, m_data, 0, - GetModule().get()); + Value &value = is_instance_ptr_base ? m_parent->GetValue() : m_value; + m_error = + value.GetValueAsData(&exe_ctx, m_data, 0, GetModule().get()); } else { m_error.Clear(); // No value so nothing to read... } |

