[Lldb-commits] [lldb] r273721 - The Objective-C Class type should not be treated as a potential dynamic type, since it actually doesn't resolve to the type of the class it points to
Enrico Granata via lldb-commits
lldb-commits at lists.llvm.org
Fri Jun 24 13:45:08 PDT 2016
Author: enrico
Date: Fri Jun 24 15:45:08 2016
New Revision: 273721
URL: http://llvm.org/viewvc/llvm-project?rev=273721&view=rev
Log:
The Objective-C Class type should not be treated as a potential dynamic type, since it actually doesn't resolve to the type of the class it points to
Fixes rdar://26535584
Modified:
lldb/trunk/source/Symbol/ClangASTContext.cpp
Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=273721&r1=273720&r2=273721&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Fri Jun 24 15:45:08 2016
@@ -3615,6 +3615,14 @@ ClangASTContext::IsPossibleDynamicType (
case clang::Type::ObjCObjectPointer:
if (check_objc)
{
+ if (auto objc_pointee_type = qual_type->getPointeeType().getTypePtrOrNull())
+ {
+ if (auto objc_object_type = llvm::dyn_cast_or_null<clang::ObjCObjectType>(objc_pointee_type))
+ {
+ if (objc_object_type->isObjCClass())
+ return false;
+ }
+ }
if (dynamic_pointee_type)
dynamic_pointee_type->SetCompilerType(getASTContext(), llvm::cast<clang::ObjCObjectPointerType>(qual_type)->getPointeeType());
return true;
More information about the lldb-commits
mailing list