fix the two xfails I added with a previous patch by making ObjC interface

types get completed when their definition is seen if previously laid out by
the code generator.

llvm-svn: 68177
This commit is contained in:
Chris Lattner
2009-04-01 02:36:43 +00:00
parent 6483908957
commit d18136a644
5 changed files with 42 additions and 5 deletions

View File

@@ -1242,9 +1242,13 @@ void CodeGenModule::EmitTopLevelDecl(Decl *D) {
case Decl::ObjCClass:
case Decl::ObjCForwardProtocol:
case Decl::ObjCCategory:
case Decl::ObjCInterface:
break;
case Decl::ObjCInterface:
// If we already laid out this interface due to an @class, and if we
// codegen'd a reference it, update the 'opaque' type to be a real type now.
Types.UpdateCompletedType(cast<ObjCInterfaceDecl>(D));
break;
case Decl::ObjCProtocol:
Runtime->GenerateProtocol(cast<ObjCProtocolDecl>(D));
break;
@@ -1252,7 +1256,6 @@ void CodeGenModule::EmitTopLevelDecl(Decl *D) {
case Decl::ObjCCategoryImpl:
// Categories have properties but don't support synthesize so we
// can ignore them here.
Runtime->GenerateCategory(cast<ObjCCategoryImplDecl>(D));
break;