[cfe-commits] r53852 - in /cfe/trunk: include/clang/AST/DeclObjC.h lib/AST/DeclObjC.cpp lib/Sema/SemaDeclObjC.cpp

Chris Lattner sabre at nondot.org
Mon Jul 21 10:23:15 PDT 2008


Author: lattner
Date: Mon Jul 21 12:23:15 2008
New Revision: 53852

URL: http://llvm.org/viewvc/llvm-project?rev=53852&view=rev
Log:
rename setReferencedProtocolList -> addReferencedProtocols to
be consistent with ObjCInterfaceDecl.

Modified:
    cfe/trunk/include/clang/AST/DeclObjC.h
    cfe/trunk/lib/AST/DeclObjC.cpp
    cfe/trunk/lib/Sema/SemaDeclObjC.cpp

Modified: cfe/trunk/include/clang/AST/DeclObjC.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclObjC.h?rev=53852&r1=53851&r2=53852&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/DeclObjC.h (original)
+++ cfe/trunk/include/clang/AST/DeclObjC.h Mon Jul 21 12:23:15 2008
@@ -782,12 +782,9 @@
   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; 

Modified: cfe/trunk/lib/AST/DeclObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclObjC.cpp?rev=53852&r1=53851&r2=53852&view=diff

==============================================================================
--- cfe/trunk/lib/AST/DeclObjC.cpp (original)
+++ cfe/trunk/lib/AST/DeclObjC.cpp Mon Jul 21 12:23:15 2008
@@ -452,8 +452,8 @@
   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;
   

Modified: cfe/trunk/lib/Sema/SemaDeclObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclObjC.cpp?rev=53852&r1=53851&r2=53852&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclObjC.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclObjC.cpp Mon Jul 21 12:23:15 2008
@@ -435,7 +435,7 @@
         RefProtocols.push_back(RefPDecl);
     }
     if (!RefProtocols.empty())
-      CDecl->setReferencedProtocolList(&RefProtocols[0], RefProtocols.size());
+      CDecl->addReferencedProtocols(&RefProtocols[0], RefProtocols.size());
   }
   CDecl->setLocEnd(EndProtoLoc);
   return CDecl;





More information about the cfe-commits mailing list