diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-02-20 20:48:45 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-02-20 20:48:45 +0000 |
| commit | 2d3a7be2f08cc3cad87ae465c79ca0170fca0090 (patch) | |
| tree | 824be16b7ac340d6637d18ae13e9a12014bf8ad1 | |
| parent | 2a9bad5ac11cfa83f69094effe68824ac5488277 (diff) | |
| download | bcm5719-llvm-2d3a7be2f08cc3cad87ae465c79ca0170fca0090.tar.gz bcm5719-llvm-2d3a7be2f08cc3cad87ae465c79ca0170fca0090.zip | |
more random cleanups, add some fixme's. ObjCCategoryImplDecl really
shouldn't be a NamedDecl.
llvm-svn: 65153
| -rw-r--r-- | clang/include/clang/AST/DeclObjC.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/clang/include/clang/AST/DeclObjC.h b/clang/include/clang/AST/DeclObjC.h index cc67431c94a..4f51f66bb37 100644 --- a/clang/include/clang/AST/DeclObjC.h +++ b/clang/include/clang/AST/DeclObjC.h @@ -360,6 +360,7 @@ class ObjCInterfaceDecl : public ObjCContainerDecl { ObjCList<ObjCIvarDecl> IVars; /// List of categories defined for this class. + /// FIXME: Why is this a linked list?? ObjCCategoryDecl *CategoryList; bool ForwardDecl:1; // declared with @class. @@ -699,7 +700,8 @@ class ObjCCategoryDecl : public ObjCContainerDecl { /// referenced protocols in this category. ObjCList<ObjCProtocolDecl> ReferencedProtocols; - /// Next category belonging to this class + /// Next category belonging to this class. + /// FIXME: this should not be a singly-linked list. Move storage elsewhere. ObjCCategoryDecl *NextClassCategory; SourceLocation EndLoc; // marks the '>' or identifier. @@ -727,7 +729,7 @@ public: return ReferencedProtocols; } - typedef ObjCProtocolDecl * const * protocol_iterator; + typedef ObjCList<ObjCProtocolDecl>::iterator protocol_iterator; protocol_iterator protocol_begin() const {return ReferencedProtocols.begin();} protocol_iterator protocol_end() const { return ReferencedProtocols.end(); } @@ -757,15 +759,18 @@ public: /// @dynamic p1,d1; /// @end /// +/// FIXME: Like ObjCImplementationDecl, this should not be a NamedDecl! +/// FIXME: Introduce a new common base class for ObjCImplementationDecl and +/// ObjCCategoryImplDecl class ObjCCategoryImplDecl : public NamedDecl, public DeclContext { /// Class interface for this category implementation ObjCInterfaceDecl *ClassInterface; /// implemented instance methods - llvm::SmallVector<ObjCMethodDecl*, 32> InstanceMethods; + llvm::SmallVector<ObjCMethodDecl*, 16> InstanceMethods; /// implemented class methods - llvm::SmallVector<ObjCMethodDecl*, 32> ClassMethods; + llvm::SmallVector<ObjCMethodDecl*, 16> ClassMethods; /// Property Implementations in this category llvm::SmallVector<ObjCPropertyImplDecl*, 8> PropertyImplementations; @@ -865,12 +870,12 @@ class ObjCImplementationDecl : public Decl, public DeclContext { ObjCList<ObjCIvarDecl> IVars; /// implemented instance methods - llvm::SmallVector<ObjCMethodDecl*, 32> InstanceMethods; + llvm::SmallVector<ObjCMethodDecl*, 16> InstanceMethods; /// implemented class methods - llvm::SmallVector<ObjCMethodDecl*, 32> ClassMethods; + llvm::SmallVector<ObjCMethodDecl*, 16> ClassMethods; - /// Propertys' being implemented + /// Properties being implemented llvm::SmallVector<ObjCPropertyImplDecl*, 8> PropertyImplementations; SourceLocation EndLoc; |

