[cfe-commits] r42711 - in /cfe/trunk: Sema/SemaDecl.cpp include/clang/AST/DeclObjC.h

Chris Lattner sabre at nondot.org
Sat Oct 6 16:12:31 PDT 2007


Author: lattner
Date: Sat Oct  6 18:12:31 2007
New Revision: 42711

URL: http://llvm.org/viewvc/llvm-project?rev=42711&view=rev
Log:
switch ObjcCategoryImplDecl over to being a NamedDecl, remove dead ctor argument.

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

Modified: cfe/trunk/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Sema/SemaDecl.cpp?rev=42711&r1=42710&r2=42711&view=diff

==============================================================================
--- cfe/trunk/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/Sema/SemaDecl.cpp Sat Oct  6 18:12:31 2007
@@ -1107,8 +1107,7 @@
                       IdentifierInfo *CatName, SourceLocation CatLoc) {
   ObjcInterfaceDecl *IDecl = getObjCInterfaceDecl(ClassName);
   ObjcCategoryImplDecl *CDecl = new ObjcCategoryImplDecl(AtCatImplLoc, 
-                                                         ClassName, IDecl,
-                                                         CatName);
+                                                         CatName, IDecl);
   /// Check that class of this category is already completely declared.
   if (!IDecl || IDecl->isForwardDecl())
     Diag(ClassLoc, diag::err_undef_interface, ClassName->getName());
@@ -1809,7 +1808,7 @@
     if (IDecl) {
       for (ObjcCategoryDecl *Categories = IDecl->getListCategories();
            Categories; Categories = Categories->getNextClassCategory()) {
-        if (Categories->getIdentifier() == CatImplClass->getObjcCatName()) {
+        if (Categories->getIdentifier() == CatImplClass->getIdentifier()) {
           ImplCategoryMethodsVsIntfMethods(CatImplClass, Categories);
           break;
         }

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

==============================================================================
--- cfe/trunk/include/clang/AST/DeclObjC.h (original)
+++ cfe/trunk/include/clang/AST/DeclObjC.h Sat Oct  6 18:12:31 2007
@@ -499,13 +499,10 @@
 
 /// ObjcCategoryImplDecl - An object of this class encapsulates a category 
 /// @implementation declaration.
-class ObjcCategoryImplDecl : public Decl {
+class ObjcCategoryImplDecl : public NamedDecl {
   /// Class interface for this category implementation
   ObjcInterfaceDecl *ClassInterface;
 
-  /// Category name
-  IdentifierInfo *ObjcCatName;
-      
   /// category instance methods being implemented
   ObjcMethodDecl **InstanceMethods; // Null if category is not implementing any
   int NumInstanceMethods;           // -1 if category is not implementing any
@@ -516,11 +513,9 @@
   
   public:
     ObjcCategoryImplDecl(SourceLocation L, IdentifierInfo *Id,
-                         ObjcInterfaceDecl *classInterface,
-                         IdentifierInfo *catName)
-    : Decl(ObjcCategoryImpl, L),
+                         ObjcInterfaceDecl *classInterface)
+    : NamedDecl(ObjcCategoryImpl, L, Id),
     ClassInterface(classInterface),
-    ObjcCatName(catName),
     InstanceMethods(0), NumInstanceMethods(-1),
     ClassMethods(0), NumClassMethods(-1) {}
         
@@ -528,8 +523,6 @@
       return ClassInterface; 
     }
   
-  IdentifierInfo *getObjcCatName() const { return ObjcCatName; }
-  
   ObjcMethodDecl **getInstanceMethods() const { return InstanceMethods; }
   int getNumInstanceMethods() const { return NumInstanceMethods; }
   





More information about the cfe-commits mailing list