jingham added inline comments.

================
Comment at: lldb/source/Core/ValueObject.cpp:1862
   }
-  if (m_dynamic_value)
+  if (m_dynamic_value && m_dynamic_value->GetError().Success())
     return m_dynamic_value->GetSP();
----------------
mib wrote:
> It would be nice if `ValueObjectDynamicValue` had a `IsValid` method that 
> returned the result of its Status attribute. Without reading the commit 
> message, `GetError` doesn't tell us much about what we're trying to achieve 
> here.
IsValid is less restrictive than having an error.  IsValid is true if the value 
has a variable in it, even if, for instance, we couldn't currently read the 
memory underlying the value.  I want "was there any error at all", so checking 
the Error is more appropriate here.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145629/new/

https://reviews.llvm.org/D145629

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to