diff options
Diffstat (limited to 'lldb/source/Plugins/LanguageRuntime')
| -rw-r--r-- | lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp | 4 | ||||
| -rw-r--r-- | lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp index 44b8468428c..2cd340980c1 100644 --- a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp +++ b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp @@ -59,6 +59,8 @@ ItaniumABILanguageRuntime::GetDynamicTypeAndAddress (ValueObject &in_value, // start of the value object which holds the dynamic type. // + class_type_or_name.Clear(); + // Only a pointer or reference type can have a different dynamic and static type: if (CouldHaveDynamicValue (in_value)) { @@ -271,7 +273,7 @@ ItaniumABILanguageRuntime::GetDynamicTypeAndAddress (ValueObject &in_value, } } - return false; + return class_type_or_name.IsEmpty() == false; } bool diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp index f194ac3d2d9..cfe7d13c697 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp @@ -329,6 +329,8 @@ AppleObjCRuntimeV2::GetDynamicTypeAndAddress (ValueObject &in_value, // The Runtime is attached to a particular process, you shouldn't pass in a value from another process. assert (in_value.GetProcessSP().get() == m_process); assert (m_process != NULL); + + class_type_or_name.Clear(); // Make sure we can have a dynamic value before starting... if (CouldHaveDynamicValue (in_value)) @@ -354,12 +356,9 @@ AppleObjCRuntimeV2::GetDynamicTypeAndAddress (ValueObject &in_value, class_type_or_name.SetTypeSP (type_sp); } } - - if (type_sp) - return true; } } - return false; + return class_type_or_name.IsEmpty() == false; } //------------------------------------------------------------------ |

