diff options
author | Chris Lattner <sabre@nondot.org> | 2009-04-01 02:36:43 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-04-01 02:36:43 +0000 |
commit | d18136a644dc1da8b9c1eba27596f36c622f7f89 (patch) | |
tree | e8d5f182738f68a96f521efe7aa62ddebbb6acc7 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 648390895746f497cd48a34d1f833c69ce3693cd (diff) | |
download | bcm5719-llvm-d18136a644dc1da8b9c1eba27596f36c622f7f89.tar.gz bcm5719-llvm-d18136a644dc1da8b9c1eba27596f36c622f7f89.zip |
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
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 59876516aa8..101b2e58b7f 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/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; |