<rdar://problem/12503640> Fixing an issue where the dynamic type of an Objective...
authorEnrico Granata <egranata@apple.com>
Wed, 17 Oct 2012 19:03:34 +0000 (19:03 +0000)
committerEnrico Granata <egranata@apple.com>
Wed, 17 Oct 2012 19:03:34 +0000 (19:03 +0000)
llvm-svn: 166119

lldb/include/lldb/Core/ValueObject.h
lldb/source/Core/ValueObject.cpp
lldb/source/Core/ValueObjectDynamicValue.cpp

index ccf11fe..4c594b6 100644 (file)
@@ -1265,6 +1265,9 @@ protected:
     DataExtractor &
     GetDataExtractor ();
     
+    void
+    ResetCompleteTypeInfo ();
+    
     //------------------------------------------------------------------
     // Sublasses must implement the functions below.
     //------------------------------------------------------------------
index 9debcc0..4db14dd 100644 (file)
@@ -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 ()
 {
index e3f27fc..b6d29d4 100644 (file)
@@ -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)