diff options
| author | David Chisnall <csdavec@swan.ac.uk> | 2010-03-13 22:20:45 +0000 |
|---|---|---|
| committer | David Chisnall <csdavec@swan.ac.uk> | 2010-03-13 22:20:45 +0000 |
| commit | 2bfc50bf6853e560f42c740fd9d237f9f53781f7 (patch) | |
| tree | 446f7af30c5e913f07ea6adaf9b372ca4106b1f8 | |
| parent | 56597588f031dfd219cb72a7b940e7b7e7d3c14f (diff) | |
| download | bcm5719-llvm-2bfc50bf6853e560f42c740fd9d237f9f53781f7.tar.gz bcm5719-llvm-2bfc50bf6853e560f42c740fd9d237f9f53781f7.zip | |
Fixed copy-and-paste error causing categories to contain the protocols declared on the class, not the protocols declared on the category.
llvm-svn: 98455
| -rw-r--r-- | clang/lib/CodeGen/CGObjCGNU.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGObjCGNU.cpp b/clang/lib/CodeGen/CGObjCGNU.cpp index 198e2d12fca..243635744ff 100644 --- a/clang/lib/CodeGen/CGObjCGNU.cpp +++ b/clang/lib/CodeGen/CGObjCGNU.cpp @@ -1147,8 +1147,8 @@ void CGObjCGNU::GenerateCategory(const ObjCCategoryImplDecl *OCD) { // Collect the names of referenced protocols llvm::SmallVector<std::string, 16> Protocols; - const ObjCInterfaceDecl *ClassDecl = OCD->getClassInterface(); - const ObjCList<ObjCProtocolDecl> &Protos =ClassDecl->getReferencedProtocols(); + const ObjCCategoryDecl *CatDecl = OCD->getCategoryDecl(); + const ObjCList<ObjCProtocolDecl> &Protos = CatDecl->getReferencedProtocols(); for (ObjCList<ObjCProtocolDecl>::iterator I = Protos.begin(), E = Protos.end(); I != E; ++I) Protocols.push_back((*I)->getNameAsString()); |

