From 356e17ce69b41905d9f9b2ce22d22dbde38e4022 Mon Sep 17 00:00:00 2001 From: Sean Callanan Date: Fri, 30 Mar 2012 02:04:38 +0000 Subject: Be more careful when overriding the type for a ValueObject, and make sure that ValueObjects that have null type names (because they have null types) also have null qualified type names. This avoids some potential crashes if ValueObject::GetQualifiedTypeName tries to get the name of their type by calling GetClangTypeImpl(). llvm-svn: 153718 --- lldb/source/Core/ValueObject.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lldb/source/Core/ValueObject.cpp') diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp index a13c84b7c38..9e27dc0b164 100644 --- a/lldb/source/Core/ValueObject.cpp +++ b/lldb/source/Core/ValueObject.cpp @@ -275,7 +275,7 @@ ClangASTType ValueObject::MaybeCalculateCompleteType () { ClangASTType ret(GetClangASTImpl(), GetClangTypeImpl()); - + if (m_did_calculate_complete_objc_class_type) { if (m_override_type.IsValid()) @@ -349,7 +349,10 @@ ValueObject::MaybeCalculateCompleteType () m_override_type = complete_class; } - return m_override_type; + if (m_override_type.IsValid()) + return m_override_type; + else + return ret; } clang::ASTContext * -- cgit v1.2.3