From bd9482d859a74bf2c45ef8b8aedec61c0e1c8374 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Sun, 1 Jan 2012 21:23:57 +0000 Subject: Eliminate ObjCForwardProtocolDecl, which is redundant now that ObjCProtocolDecl modules forward declarations properly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147415 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenModule.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lib/CodeGen/CodeGenModule.cpp') diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 12c4dff39c..9e772b40c4 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -2375,7 +2375,6 @@ void CodeGenModule::EmitTopLevelDecl(Decl *D) { // Objective-C Decls // Forward declarations, no (immediate) code generation. - case Decl::ObjCForwardProtocol: case Decl::ObjCInterface: break; @@ -2386,10 +2385,13 @@ void CodeGenModule::EmitTopLevelDecl(Decl *D) { break; } - case Decl::ObjCProtocol: - ObjCRuntime->GenerateProtocol(cast(D)); + case Decl::ObjCProtocol: { + ObjCProtocolDecl *Proto = cast(D); + if (Proto->isThisDeclarationADefinition()) + ObjCRuntime->GenerateProtocol(Proto); break; - + } + case Decl::ObjCCategoryImpl: // Categories have properties but don't support synthesize so we // can ignore them here. -- cgit v1.2.3-70-g09d2