Fixed an issue where objc types weren't ever getting fully resolved (beyond

forward declarations).

llvm-svn: 116181
This commit is contained in:
Greg Clayton 2010-10-11 02:25:34 +00:00
parent e46dd32b69
commit aaf99e04ca
3 changed files with 18 additions and 9 deletions

View File

@ -784,7 +784,7 @@ ClangASTContext::CreateRecordType (const char *name, int kind, DeclContext *decl
if (language == eLanguageTypeObjC)
{
bool isForwardDecl = false;
bool isForwardDecl = true;
bool isInternal = false;
return CreateObjCClass (name, decl_ctx, isForwardDecl, isInternal);
}

View File

@ -825,6 +825,16 @@ ClangASTType::IsDefined (clang_type_t clang_type)
return tag_decl->getDefinition() != NULL;
return false;
}
else
{
clang::ObjCObjectType *objc_class_type = dyn_cast<clang::ObjCObjectType>(qual_type);
if (objc_class_type)
{
clang::ObjCInterfaceDecl *class_interface_decl = objc_class_type->getInterface();
if (class_interface_decl->isForwardDecl())
return false;
}
}
return true;
}

View File

@ -529,15 +529,14 @@ lldb_private::Type::ResolveClangType (bool forward_decl_is_ok)
// definition.
m_symbol_file->ResolveClangOpaqueTypeDefinition (m_clang_qual_type);
}
else
{
// If we have an encoding type, then we need to make sure it is
// resolved appropriately
Type *encoding_type = GetEncodingType ();
if (encoding_type != NULL)
encoding_type->ResolveClangType (forward_decl_is_ok);
}
}
// If we have an encoding type, then we need to make sure it is
// resolved appropriately
Type *encoding_type = GetEncodingType ();
if (encoding_type != NULL)
encoding_type->ResolveClangType (forward_decl_is_ok);
// if (g_depth > 0)
// --g_depth;
return m_clang_qual_type != NULL;