[cfe-commits] r98455 - /cfe/trunk/lib/CodeGen/CGObjCGNU.cpp

David Chisnall csdavec at swan.ac.uk
Sat Mar 13 14:20:45 PST 2010


Author: theraven
Date: Sat Mar 13 16:20:45 2010
New Revision: 98455

URL: http://llvm.org/viewvc/llvm-project?rev=98455&view=rev
Log:
Fixed copy-and-paste error causing categories to contain the protocols declared on the class, not the protocols declared on the category.


Modified:
    cfe/trunk/lib/CodeGen/CGObjCGNU.cpp

Modified: cfe/trunk/lib/CodeGen/CGObjCGNU.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCGNU.cpp?rev=98455&r1=98454&r2=98455&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCGNU.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCGNU.cpp Sat Mar 13 16:20:45 2010
@@ -1147,8 +1147,8 @@
 
   // 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());





More information about the cfe-commits mailing list