diff options
| author | Jim Ingham <jingham@apple.com> | 2023-03-10 10:08:26 -0800 |
|---|---|---|
| committer | Jim Ingham <jingham@apple.com> | 2023-03-10 10:21:50 -0800 |
| commit | e1462d14b1e4be329a95bdd08181b97a7a3ad6e6 (patch) | |
| tree | 7a7d9b4e420415da361f575e14bfb45cec5d5007 /lldb/source/Core/ValueObjectConstResult.cpp | |
| parent | 79f6b812356880f64975998fda72d06d46735ad6 (diff) | |
Don't produce a dynamic value if there was an error creating it.
We used to make a dynamic value that "pretended to be its parent"
but that's hard for some of the more complex ValueObject types, and
it's better in this case just to return no dynamic value.
Differential Revision: https://reviews.llvm.org/D145629
Diffstat (limited to 'lldb/source/Core/ValueObjectConstResult.cpp')
| -rw-r--r-- | lldb/source/Core/ValueObjectConstResult.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Core/ValueObjectConstResult.cpp b/lldb/source/Core/ValueObjectConstResult.cpp index 640abdddfcad..17a725dcc7dd 100644 --- a/lldb/source/Core/ValueObjectConstResult.cpp +++ b/lldb/source/Core/ValueObjectConstResult.cpp @@ -287,7 +287,7 @@ ValueObjectConstResult::GetDynamicValue(lldb::DynamicValueType use_dynamic) { if (process && process->IsPossibleDynamicValue(*this)) m_dynamic_value = new ValueObjectDynamicValue(*this, use_dynamic); } - if (m_dynamic_value) + if (m_dynamic_value && m_dynamic_value->GetError().Success()) return m_dynamic_value->GetSP(); } return ValueObjectSP(); |
