]> granicus.if.org Git - clang/commitdiff
rename setReferencedProtocolList -> addReferencedProtocols to
authorChris Lattner <sabre@nondot.org>
Mon, 21 Jul 2008 17:23:15 +0000 (17:23 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 21 Jul 2008 17:23:15 +0000 (17:23 +0000)
be consistent with ObjCInterfaceDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53852 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/DeclObjC.h
lib/AST/DeclObjC.cpp
lib/Sema/SemaDeclObjC.cpp

index 8c8325fb671635a89bbc94eafb76edc3368641b5..5f216cf00a27a8b1b366b4a1d03a0172e26ae417 100644 (file)
@@ -782,12 +782,9 @@ public:
   const ObjCInterfaceDecl *getClassInterface() const { return ClassInterface; }
   void setClassInterface(ObjCInterfaceDecl *IDecl) { ClassInterface = IDecl; }
   
-  void setReferencedProtocolList(ObjCProtocolDecl **List, unsigned NumRPs);
-  
-  void setCatReferencedProtocols(unsigned idx, ObjCProtocolDecl *OID) {
-    assert((idx < NumReferencedProtocols) && "index out of range");
-    ReferencedProtocols[idx] = OID;
-  }
+  /// addReferencedProtocols - Set the list of protocols that this interface
+  /// implements.
+  void addReferencedProtocols(ObjCProtocolDecl **List, unsigned NumRPs);
   
   ObjCProtocolDecl **getReferencedProtocols() const { 
     return ReferencedProtocols; 
index a1011b830e10c5e3eb8b543f33f62ae69bcd652c..5da762e1fbf32159b5822de1fced890e58c0e68d 100644 (file)
@@ -452,8 +452,8 @@ void ObjCProtocolDecl::addMethods(ObjCMethodDecl **insMethods,
   AtEndLoc = endLoc;
 }
 
-void ObjCCategoryDecl::setReferencedProtocolList(ObjCProtocolDecl **List,
-                                                 unsigned NumRPs) {
+void ObjCCategoryDecl::addReferencedProtocols(ObjCProtocolDecl **List,
+                                              unsigned NumRPs) {
   assert(NumReferencedProtocols == 0 && "Protocol list already set");
   if (NumRPs == 0) return;
   
index 8cceda2966b7c874366076268c847b29456e141d..ad40cbe84538cf86cfb16fc425967d0fed770010 100644 (file)
@@ -435,7 +435,7 @@ Sema::DeclTy *Sema::ActOnStartCategoryInterface(
         RefProtocols.push_back(RefPDecl);
     }
     if (!RefProtocols.empty())
-      CDecl->setReferencedProtocolList(&RefProtocols[0], RefProtocols.size());
+      CDecl->addReferencedProtocols(&RefProtocols[0], RefProtocols.size());
   }
   CDecl->setLocEnd(EndProtoLoc);
   return CDecl;