summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-03-21 18:06:45 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-03-21 18:06:45 +0000
commit629aed9327049b57d609cf8795bc2a54ce1afee8 (patch)
tree7c499c99c24594de1984f81b8d4771aca5ddacde /clang/lib/CodeGen/CodeGenModule.cpp
parent891d57155e148556b8777a081e36920929b508cf (diff)
downloadbcm5719-llvm-629aed9327049b57d609cf8795bc2a54ce1afee8.tar.gz
bcm5719-llvm-629aed9327049b57d609cf8795bc2a54ce1afee8.zip
Issue error if variables are defined inside an objc class,
category or protocol. llvm-svn: 67450
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 93bf6dd8f00..b259a5dc2cf 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -1270,21 +1270,13 @@ void CodeGenModule::EmitTopLevelDecl(Decl *D) {
// Forward declarations, no (immediate) code generation.
case Decl::ObjCClass:
case Decl::ObjCForwardProtocol:
+ case Decl::ObjCCategory:
+ case Decl::ObjCInterface:
break;
case Decl::ObjCProtocol:
- case Decl::ObjCCategory:
- case Decl::ObjCInterface: {
- ObjCContainerDecl *OCD = cast<ObjCContainerDecl>(D);
- for (ObjCContainerDecl::tuvar_iterator i = OCD->tuvar_begin(),
- e = OCD->tuvar_end(); i != e; ++i) {
- VarDecl *VD = *i;
- EmitGlobal(VD);
- }
- if (D->getKind() == Decl::ObjCProtocol)
- Runtime->GenerateProtocol(cast<ObjCProtocolDecl>(D));
+ Runtime->GenerateProtocol(cast<ObjCProtocolDecl>(D));
break;
- }
case Decl::ObjCCategoryImpl:
// Categories have properties but don't support synthesize so we
OpenPOWER on IntegriCloud