diff options
| author | Douglas Gregor <dgregor@apple.com> | 2012-01-01 21:23:57 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2012-01-01 21:23:57 +0000 |
| commit | f61026758145df2f845f9c28e89f53c084d35cb2 (patch) | |
| tree | 24699428a99f060286b52844b9d54089e363da38 /clang/lib/CodeGen | |
| parent | c51118238c9a05a3113ce0057bb10169b583a6c5 (diff) | |
| download | bcm5719-llvm-f61026758145df2f845f9c28e89f53c084d35cb2.tar.gz bcm5719-llvm-f61026758145df2f845f9c28e89f53c084d35cb2.zip | |
Eliminate ObjCForwardProtocolDecl, which is redundant now that
ObjCProtocolDecl modules forward declarations properly.
llvm-svn: 147415
Diffstat (limited to 'clang/lib/CodeGen')
| -rw-r--r-- | clang/lib/CodeGen/CGDecl.cpp | 1 | ||||
| -rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 10 |
2 files changed, 6 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp index 43077cefa09..05087f0e951 100644 --- a/clang/lib/CodeGen/CGDecl.cpp +++ b/clang/lib/CodeGen/CGDecl.cpp @@ -65,7 +65,6 @@ void CodeGenFunction::EmitDecl(const Decl &D) { case Decl::AccessSpec: case Decl::LinkageSpec: case Decl::ObjCPropertyImpl: - case Decl::ObjCForwardProtocol: case Decl::FileScopeAsm: case Decl::Friend: case Decl::FriendTemplate: diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 12c4dff39c0..9e772b40c45 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. |

