summaryrefslogtreecommitdiffstats
path: root/lldb
diff options
context:
space:
mode:
Diffstat (limited to 'lldb')
-rw-r--r--lldb/source/Core/ValueObject.cpp7
-rw-r--r--lldb/source/Symbol/ClangASTContext.cpp2
2 files changed, 6 insertions, 3 deletions
diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp
index fb3c9b3c06c..031d7546339 100644
--- a/lldb/source/Core/ValueObject.cpp
+++ b/lldb/source/Core/ValueObject.cpp
@@ -1899,10 +1899,13 @@ ValueObject::IsPossibleDynamicType ()
bool
ValueObject::IsObjCNil ()
{
- bool isObjCpointer = ClangASTContext::IsObjCObjectPointerType(GetClangType(), NULL);
+ const uint32_t mask = ClangASTContext::eTypeIsObjC | ClangASTContext::eTypeIsPointer;
+ bool isObjCpointer = ( ((ClangASTContext::GetTypeInfo(GetClangType(), GetClangAST(), NULL)) & mask) == mask);
+ if (!isObjCpointer)
+ return false;
bool canReadValue = true;
bool isZero = GetValueAsUnsigned(0,&canReadValue) == 0;
- return canReadValue && isZero && isObjCpointer;
+ return canReadValue && isZero;
}
ValueObjectSP
diff --git a/lldb/source/Symbol/ClangASTContext.cpp b/lldb/source/Symbol/ClangASTContext.cpp
index 0b8465e414c..28679b93e37 100644
--- a/lldb/source/Symbol/ClangASTContext.cpp
+++ b/lldb/source/Symbol/ClangASTContext.cpp
@@ -2920,7 +2920,7 @@ ClangASTContext::GetTypeInfo
case clang::BuiltinType::ObjCClass:
if (ast && pointee_or_element_clang_type)
*pointee_or_element_clang_type = ast->ObjCBuiltinClassTy.getAsOpaquePtr();
- return eTypeIsBuiltIn | eTypeIsPointer | eTypeHasValue;
+ return eTypeIsBuiltIn | eTypeIsPointer | eTypeHasValue | eTypeIsObjC;
break;
case clang::BuiltinType::Bool:
case clang::BuiltinType::Char_U:
OpenPOWER on IntegriCloud