From ad9e06d82ae627e858e5bfe4a7f1f9337b5b0a15 Mon Sep 17 00:00:00 2001 From: David Chisnall Date: Sat, 13 Mar 2010 22:20:45 +0000 Subject: [PATCH] Fixed copy-and-paste error causing categories to contain the protocols declared on the class, not the protocols declared on the category. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98455 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGObjCGNU.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/CodeGen/CGObjCGNU.cpp b/lib/CodeGen/CGObjCGNU.cpp index 198e2d12fc..243635744f 100644 --- a/lib/CodeGen/CGObjCGNU.cpp +++ b/lib/CodeGen/CGObjCGNU.cpp @@ -1147,8 +1147,8 @@ void CGObjCGNU::GenerateCategory(const ObjCCategoryImplDecl *OCD) { // Collect the names of referenced protocols llvm::SmallVector Protocols; - const ObjCInterfaceDecl *ClassDecl = OCD->getClassInterface(); - const ObjCList &Protos =ClassDecl->getReferencedProtocols(); + const ObjCCategoryDecl *CatDecl = OCD->getCategoryDecl(); + const ObjCList &Protos = CatDecl->getReferencedProtocols(); for (ObjCList::iterator I = Protos.begin(), E = Protos.end(); I != E; ++I) Protocols.push_back((*I)->getNameAsString()); -- 2.40.0