Simplify code for readability. (NFC)
authorAdrian Prantl <aprantl@apple.com>
Wed, 19 Dec 2018 23:48:40 +0000 (23:48 +0000)
committerAdrian Prantl <aprantl@apple.com>
Wed, 19 Dec 2018 23:48:40 +0000 (23:48 +0000)
llvm-svn: 349700

lldb/source/Core/ValueObjectChild.cpp

index 7255eed..0f7be83 100644 (file)
@@ -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...
         }