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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68177 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index 5987651..101b2e5 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/lib/CodeGen/CodeGenModule.cpp
@@ -1242,9 +1242,13 @@
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 @@
case Decl::ObjCCategoryImpl:
// Categories have properties but don't support synthesize so we
// can ignore them here.
-
Runtime->GenerateCategory(cast<ObjCCategoryImplDecl>(D));
break;