aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-01-01 21:23:57 +0000
committerDouglas Gregor <dgregor@apple.com>2012-01-01 21:23:57 +0000
commitf61026758145df2f845f9c28e89f53c084d35cb2 (patch)
tree24699428a99f060286b52844b9d54089e363da38 /clang/lib/CodeGen/CodeGenModule.cpp
parentc51118238c9a05a3113ce0057bb10169b583a6c5 (diff)
downloadllvm-f61026758145df2f845f9c28e89f53c084d35cb2.zip
llvm-f61026758145df2f845f9c28e89f53c084d35cb2.tar.gz
llvm-f61026758145df2f845f9c28e89f53c084d35cb2.tar.bz2
Eliminate ObjCForwardProtocolDecl, which is redundant now that
ObjCProtocolDecl modules forward declarations properly. llvm-svn: 147415
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 12c4dff..9e772b4 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/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<ObjCProtocolDecl>(D));
+ case Decl::ObjCProtocol: {
+ ObjCProtocolDecl *Proto = cast<ObjCProtocolDecl>(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.