Skip to content
Snippets Groups Projects
Commit 13ac0e25 authored by Enrico Granata's avatar Enrico Granata
Browse files

<rdar://problem/12503640> Fixing an issue where the dynamic type of an...

<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
parent 56a12cea
No related branches found
No related tags found
No related merge requests found
...@@ -1265,6 +1265,9 @@ protected: ...@@ -1265,6 +1265,9 @@ protected:
DataExtractor & DataExtractor &
GetDataExtractor (); GetDataExtractor ();
void
ResetCompleteTypeInfo ();
//------------------------------------------------------------------ //------------------------------------------------------------------
// Sublasses must implement the functions below. // Sublasses must implement the functions below.
//------------------------------------------------------------------ //------------------------------------------------------------------
......
...@@ -274,6 +274,13 @@ ValueObject::SetNeedsUpdate () ...@@ -274,6 +274,13 @@ ValueObject::SetNeedsUpdate ()
ClearUserVisibleData(eClearUserVisibleDataItemsValue); ClearUserVisibleData(eClearUserVisibleDataItemsValue);
} }
void
ValueObject::ResetCompleteTypeInfo ()
{
m_did_calculate_complete_objc_class_type = false;
m_override_type = ClangASTType();
}
ClangASTType ClangASTType
ValueObject::MaybeCalculateCompleteType () ValueObject::MaybeCalculateCompleteType ()
{ {
......
...@@ -290,12 +290,14 @@ ValueObjectDynamicValue::UpdateValue () ...@@ -290,12 +290,14 @@ ValueObjectDynamicValue::UpdateValue ()
if (!m_type_sp) if (!m_type_sp)
{ {
m_type_sp = dynamic_type_sp; m_type_sp = dynamic_type_sp;
ResetCompleteTypeInfo ();
} }
else if (dynamic_type_sp != m_type_sp) else if (dynamic_type_sp != m_type_sp)
{ {
// We are another type, we need to tear down our children... // We are another type, we need to tear down our children...
m_type_sp = dynamic_type_sp; m_type_sp = dynamic_type_sp;
SetValueDidChange (true); SetValueDidChange (true);
ResetCompleteTypeInfo ();
} }
if (!m_address.IsValid() || m_address != dynamic_address) if (!m_address.IsValid() || m_address != dynamic_address)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment