aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-01 02:36:43 +0000
committerChris Lattner <sabre@nondot.org>2009-04-01 02:36:43 +0000
commit285d0dba947b7c9960eaa88e8c4fced0398d4319 (patch)
tree7f13cbb8bfb8e2e4383952425543ff52ba31b252 /lib/CodeGen/CodeGenModule.cpp
parent5ad0f6778556535dca448e9d82e674d2d255ad06 (diff)
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
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--lib/CodeGen/CodeGenModule.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index 59876516aa..101b2e58b7 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/lib/CodeGen/CodeGenModule.cpp
@@ -1242,9 +1242,13 @@ void CodeGenModule::EmitTopLevelDecl(Decl *D) {
case Decl::ObjCClass:
case Decl::ObjCForwardProtocol:
case Decl::ObjCCategory:
+ 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;