diff options
| author | Enrico Granata <egranata@apple.com> | 2012-10-17 19:03:34 +0000 |
|---|---|---|
| committer | Enrico Granata <egranata@apple.com> | 2012-10-17 19:03:34 +0000 |
| commit | 13ac0e253d0955248e66a2fa34064ed70e3daca1 (patch) | |
| tree | f59095984146ff2470914c5cd27d9ef05532e79d /lldb | |
| parent | 56a12cea138c61e03e040dd6280a2831a091144b (diff) | |
| download | bcm5719-llvm-13ac0e253d0955248e66a2fa34064ed70e3daca1.tar.gz bcm5719-llvm-13ac0e253d0955248e66a2fa34064ed70e3daca1.zip | |
<rdar://problem/12503640> Fixing an issue where the dynamic type of an Objective-C pointer changed but we still reported the one-true-definition for the previous type. This was causing issues where a variable could be reported as being of an entirely different type after an assignment
llvm-svn: 166119
Diffstat (limited to 'lldb')
| -rw-r--r-- | lldb/include/lldb/Core/ValueObject.h | 3 | ||||
| -rw-r--r-- | lldb/source/Core/ValueObject.cpp | 7 | ||||
| -rw-r--r-- | lldb/source/Core/ValueObjectDynamicValue.cpp | 2 |
3 files changed, 12 insertions, 0 deletions
diff --git a/lldb/include/lldb/Core/ValueObject.h b/lldb/include/lldb/Core/ValueObject.h index ccf11feea50..4c594b6f2a2 100644 --- a/lldb/include/lldb/Core/ValueObject.h +++ b/lldb/include/lldb/Core/ValueObject.h @@ -1265,6 +1265,9 @@ protected: DataExtractor & GetDataExtractor (); + void + ResetCompleteTypeInfo (); + //------------------------------------------------------------------ // Sublasses must implement the functions below. //------------------------------------------------------------------ diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp index 9debcc0318a..4db14ddd37f 100644 --- a/lldb/source/Core/ValueObject.cpp +++ b/lldb/source/Core/ValueObject.cpp @@ -274,6 +274,13 @@ ValueObject::SetNeedsUpdate () ClearUserVisibleData(eClearUserVisibleDataItemsValue); } +void +ValueObject::ResetCompleteTypeInfo () +{ + m_did_calculate_complete_objc_class_type = false; + m_override_type = ClangASTType(); +} + ClangASTType ValueObject::MaybeCalculateCompleteType () { diff --git a/lldb/source/Core/ValueObjectDynamicValue.cpp b/lldb/source/Core/ValueObjectDynamicValue.cpp index e3f27fc0bb9..b6d29d47b5b 100644 --- a/lldb/source/Core/ValueObjectDynamicValue.cpp +++ b/lldb/source/Core/ValueObjectDynamicValue.cpp @@ -290,12 +290,14 @@ ValueObjectDynamicValue::UpdateValue () if (!m_type_sp) { m_type_sp = dynamic_type_sp; + ResetCompleteTypeInfo (); } else if (dynamic_type_sp != m_type_sp) { // We are another type, we need to tear down our children... m_type_sp = dynamic_type_sp; SetValueDidChange (true); + ResetCompleteTypeInfo (); } if (!m_address.IsValid() || m_address != dynamic_address) |

