[Lldb-commits] [lldb] r219142 - Fix a problem where LLDB was constructing a TypeImpl marking the dynamic type as the static type. Instead use the TypeImpl() constructor correctly

Enrico Granata egranata at apple.com
Mon Oct 6 14:00:30 PDT 2014


Author: enrico
Date: Mon Oct  6 16:00:30 2014
New Revision: 219142

URL: http://llvm.org/viewvc/llvm-project?rev=219142&view=rev
Log:
Fix a problem where LLDB was constructing a TypeImpl marking the dynamic type as the static type. Instead use the TypeImpl() constructor correctly

Modified:
    lldb/trunk/source/API/SBType.cpp
    lldb/trunk/source/Core/ValueObjectDynamicValue.cpp

Modified: lldb/trunk/source/API/SBType.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBType.cpp?rev=219142&r1=219141&r2=219142&view=diff
==============================================================================
--- lldb/trunk/source/API/SBType.cpp (original)
+++ lldb/trunk/source/API/SBType.cpp Mon Oct  6 16:00:30 2014
@@ -324,7 +324,7 @@ uint32_t
 SBType::GetNumberOfFields ()
 {
     if (IsValid())
-        return m_opaque_sp->GetClangASTType(false).GetNumFields();
+        return m_opaque_sp->GetClangASTType(true).GetNumFields();
     return 0;
 }
 

Modified: lldb/trunk/source/Core/ValueObjectDynamicValue.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectDynamicValue.cpp?rev=219142&r1=219141&r2=219142&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectDynamicValue.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectDynamicValue.cpp Mon Oct  6 16:00:30 2014
@@ -249,7 +249,7 @@ ValueObjectDynamicValue::UpdateValue ()
             }
             else
             {
-                m_type_impl = TypeImpl(FixupTypeAndOrName(class_type_or_name, *m_parent).GetClangASTType());
+                m_type_impl = TypeImpl(m_parent->GetClangType(),FixupTypeAndOrName(class_type_or_name, *m_parent).GetClangASTType());
             }
         }
         else





More information about the lldb-commits mailing list