[cfe-commits] r42555 - in /cfe/trunk: AST/Decl.cpp Sema/SemaDecl.cpp clang.xcodeproj/project.pbxproj include/clang/AST/DeclObjC.h
Fariborz Jahanian
fjahanian at apple.com
Tue Oct 2 15:05:16 PDT 2007
Author: fjahanian
Date: Tue Oct 2 17:05:16 2007
New Revision: 42555
URL: http://llvm.org/viewvc/llvm-project?rev=42555&view=rev
Log:
Unified such names as protocol references, instance methods and class methods
and their accessors in a variety of objective-c classes.
Modified:
cfe/trunk/AST/Decl.cpp
cfe/trunk/Sema/SemaDecl.cpp
cfe/trunk/clang.xcodeproj/project.pbxproj
cfe/trunk/include/clang/AST/DeclObjC.h
Modified: cfe/trunk/AST/Decl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/AST/Decl.cpp?rev=42555&r1=42554&r2=42555&view=diff
==============================================================================
--- cfe/trunk/AST/Decl.cpp (original)
+++ cfe/trunk/AST/Decl.cpp Tue Oct 2 17:05:16 2007
@@ -320,15 +320,15 @@
unsigned numInsMembers,
ObjcMethodDecl **clsMethods,
unsigned numClsMembers) {
- NumInsMethods = numInsMembers;
+ NumInstanceMethods = numInsMembers;
if (numInsMembers) {
- InsMethods = new ObjcMethodDecl*[numInsMembers];
- memcpy(InsMethods, insMethods, numInsMembers*sizeof(ObjcMethodDecl*));
+ InstanceMethods = new ObjcMethodDecl*[numInsMembers];
+ memcpy(InstanceMethods, insMethods, numInsMembers*sizeof(ObjcMethodDecl*));
}
- NumClsMethods = numClsMembers;
+ NumClassMethods = numClsMembers;
if (numClsMembers) {
- ClsMethods = new ObjcMethodDecl*[numClsMembers];
- memcpy(ClsMethods, clsMethods, numClsMembers*sizeof(ObjcMethodDecl*));
+ ClassMethods = new ObjcMethodDecl*[numClsMembers];
+ memcpy(ClassMethods, clsMethods, numClsMembers*sizeof(ObjcMethodDecl*));
}
}
@@ -339,15 +339,15 @@
unsigned numInsMembers,
ObjcMethodDecl **clsMethods,
unsigned numClsMembers) {
- NumProtoInsMethods = numInsMembers;
+ NumInstanceMethods = numInsMembers;
if (numInsMembers) {
- ProtoInsMethods = new ObjcMethodDecl*[numInsMembers];
- memcpy(ProtoInsMethods, insMethods, numInsMembers*sizeof(ObjcMethodDecl*));
+ InstanceMethods = new ObjcMethodDecl*[numInsMembers];
+ memcpy(InstanceMethods, insMethods, numInsMembers*sizeof(ObjcMethodDecl*));
}
- NumProtoClsMethods = numClsMembers;
+ NumClassMethods = numClsMembers;
if (numClsMembers) {
- ProtoClsMethods = new ObjcMethodDecl*[numClsMembers];
- memcpy(ProtoClsMethods, clsMethods, numClsMembers*sizeof(ObjcMethodDecl*));
+ ClassMethods = new ObjcMethodDecl*[numClsMembers];
+ memcpy(ClassMethods, clsMethods, numClsMembers*sizeof(ObjcMethodDecl*));
}
}
@@ -358,15 +358,15 @@
unsigned numInsMembers,
ObjcMethodDecl **clsMethods,
unsigned numClsMembers) {
- NumCatInsMethods = numInsMembers;
+ NumInstanceMethods = numInsMembers;
if (numInsMembers) {
- CatInsMethods = new ObjcMethodDecl*[numInsMembers];
- memcpy(CatInsMethods, insMethods, numInsMembers*sizeof(ObjcMethodDecl*));
+ InstanceMethods = new ObjcMethodDecl*[numInsMembers];
+ memcpy(InstanceMethods, insMethods, numInsMembers*sizeof(ObjcMethodDecl*));
}
- NumCatClsMethods = numClsMembers;
+ NumClassMethods = numClsMembers;
if (numClsMembers) {
- CatClsMethods = new ObjcMethodDecl*[numClsMembers];
- memcpy(CatClsMethods, clsMethods, numClsMembers*sizeof(ObjcMethodDecl*));
+ ClassMethods = new ObjcMethodDecl*[numClsMembers];
+ memcpy(ClassMethods, clsMethods, numClsMembers*sizeof(ObjcMethodDecl*));
}
}
@@ -377,15 +377,15 @@
unsigned numInsMembers,
ObjcMethodDecl **clsMethods,
unsigned numClsMembers) {
- NumCatInsMethods = numInsMembers;
+ NumInstanceMethods = numInsMembers;
if (numInsMembers) {
- CatInsMethods = new ObjcMethodDecl*[numInsMembers];
- memcpy(CatInsMethods, insMethods, numInsMembers*sizeof(ObjcMethodDecl*));
+ InstanceMethods = new ObjcMethodDecl*[numInsMembers];
+ memcpy(InstanceMethods, insMethods, numInsMembers*sizeof(ObjcMethodDecl*));
}
- NumCatClsMethods = numClsMembers;
+ NumClassMethods = numClsMembers;
if (numClsMembers) {
- CatClsMethods = new ObjcMethodDecl*[numClsMembers];
- memcpy(CatClsMethods, clsMethods, numClsMembers*sizeof(ObjcMethodDecl*));
+ ClassMethods = new ObjcMethodDecl*[numClsMembers];
+ memcpy(ClassMethods, clsMethods, numClsMembers*sizeof(ObjcMethodDecl*));
}
}
@@ -396,15 +396,15 @@
unsigned numInsMembers,
ObjcMethodDecl **clsMethods,
unsigned numClsMembers) {
- NumInsMethods = numInsMembers;
+ NumInstanceMethods = numInsMembers;
if (numInsMembers) {
- InsMethods = new ObjcMethodDecl*[numInsMembers];
- memcpy(InsMethods, insMethods, numInsMembers*sizeof(ObjcMethodDecl*));
+ InstanceMethods = new ObjcMethodDecl*[numInsMembers];
+ memcpy(InstanceMethods, insMethods, numInsMembers*sizeof(ObjcMethodDecl*));
}
- NumClsMethods = numClsMembers;
+ NumClassMethods = numClsMembers;
if (numClsMembers) {
- ClsMethods = new ObjcMethodDecl*[numClsMembers];
- memcpy(ClsMethods, clsMethods, numClsMembers*sizeof(ObjcMethodDecl*));
+ ClassMethods = new ObjcMethodDecl*[numClsMembers];
+ memcpy(ClassMethods, clsMethods, numClsMembers*sizeof(ObjcMethodDecl*));
}
}
@@ -412,8 +412,8 @@
ObjcMethodDecl *ObjcInterfaceDecl::lookupInstanceMethod(Selector &Sel) {
ObjcInterfaceDecl* ClassDecl = this;
while (ClassDecl != NULL) {
- ObjcMethodDecl **methods = ClassDecl->getInsMethods();
- int methodCount = ClassDecl->getNumInsMethods();
+ ObjcMethodDecl **methods = ClassDecl->getInstanceMethods();
+ int methodCount = ClassDecl->getNumInstanceMethods();
for (int i = 0; i < methodCount; ++i) {
if (methods[i]->getSelector() == Sel) {
return methods[i];
@@ -428,8 +428,8 @@
ObjcMethodDecl *ObjcInterfaceDecl::lookupClassMethod(Selector &Sel) {
ObjcInterfaceDecl* ClassDecl = this;
while (ClassDecl != NULL) {
- ObjcMethodDecl **methods = ClassDecl->getClsMethods();
- int methodCount = ClassDecl->getNumClsMethods();
+ ObjcMethodDecl **methods = ClassDecl->getClassMethods();
+ int methodCount = ClassDecl->getNumClassMethods();
for (int i = 0; i < methodCount; ++i) {
if (methods[i]->getSelector() == Sel) {
return methods[i];
Modified: cfe/trunk/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Sema/SemaDecl.cpp?rev=42555&r1=42554&r2=42555&view=diff
==============================================================================
--- cfe/trunk/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/Sema/SemaDecl.cpp Tue Oct 2 17:05:16 2007
@@ -1221,8 +1221,8 @@
const llvm::DenseMap<void *, char>& InsMap,
const llvm::DenseMap<void *, char>& ClsMap) {
// check unimplemented instance methods.
- ObjcMethodDecl** methods = PDecl->getInsMethods();
- for (int j = 0; j < PDecl->getNumInsMethods(); j++)
+ ObjcMethodDecl** methods = PDecl->getInstanceMethods();
+ for (int j = 0; j < PDecl->getNumInstanceMethods(); j++)
if (!InsMap.count(methods[j]->getSelector().getAsOpaquePtr())) {
llvm::SmallString<128> buf;
Diag(methods[j]->getLocation(), diag::warn_undef_method_impl,
@@ -1230,8 +1230,8 @@
IncompleteImpl = true;
}
// check unimplemented class methods
- methods = PDecl->getClsMethods();
- for (int j = 0; j < PDecl->getNumClsMethods(); j++)
+ methods = PDecl->getClassMethods();
+ for (int j = 0; j < PDecl->getNumClassMethods(); j++)
if (!ClsMap.count(methods[j]->getSelector().getAsOpaquePtr())) {
llvm::SmallString<128> buf;
Diag(methods[j]->getLocation(), diag::warn_undef_method_impl,
@@ -1250,14 +1250,14 @@
llvm::DenseMap<void *, char> InsMap;
// Check and see if instance methods in class interface have been
// implemented in the implementation class.
- ObjcMethodDecl **methods = IMPDecl->getInsMethods();
- for (int i=0; i < IMPDecl->getNumInsMethods(); i++) {
+ ObjcMethodDecl **methods = IMPDecl->getInstanceMethods();
+ for (int i=0; i < IMPDecl->getNumInstanceMethods(); i++) {
InsMap[methods[i]->getSelector().getAsOpaquePtr()] = 'a';
}
bool IncompleteImpl = false;
- methods = IDecl->getInsMethods();
- for (int j = 0; j < IDecl->getNumInsMethods(); j++)
+ methods = IDecl->getInstanceMethods();
+ for (int j = 0; j < IDecl->getNumInstanceMethods(); j++)
if (!InsMap.count(methods[j]->getSelector().getAsOpaquePtr())) {
llvm::SmallString<128> buf;
Diag(methods[j]->getLocation(), diag::warn_undef_method_impl,
@@ -1267,13 +1267,13 @@
llvm::DenseMap<void *, char> ClsMap;
// Check and see if class methods in class interface have been
// implemented in the implementation class.
- methods = IMPDecl->getClsMethods();
- for (int i=0; i < IMPDecl->getNumClsMethods(); i++) {
+ methods = IMPDecl->getClassMethods();
+ for (int i=0; i < IMPDecl->getNumClassMethods(); i++) {
ClsMap[methods[i]->getSelector().getAsOpaquePtr()] = 'a';
}
- methods = IDecl->getClsMethods();
- for (int j = 0; j < IDecl->getNumClsMethods(); j++)
+ methods = IDecl->getClassMethods();
+ for (int j = 0; j < IDecl->getNumClassMethods(); j++)
if (!ClsMap.count(methods[j]->getSelector().getAsOpaquePtr())) {
llvm::SmallString<128> buf;
Diag(methods[j]->getLocation(), diag::warn_undef_method_impl,
@@ -1283,7 +1283,7 @@
// Check the protocol list for unimplemented methods in the @implementation
// class.
- ObjcProtocolDecl** protocols = IDecl->getIntfRefProtocols();
+ ObjcProtocolDecl** protocols = IDecl->getReferencedProtocols();
for (int i = 0; i < IDecl->getNumIntfRefProtocols(); i++) {
ObjcProtocolDecl* PDecl = protocols[i];
CheckProtocolMethodDefs(PDecl, IncompleteImpl, InsMap, ClsMap);
@@ -1300,14 +1300,14 @@
llvm::DenseMap<void *, char> InsMap;
// Check and see if instance methods in category interface have been
// implemented in its implementation class.
- ObjcMethodDecl **methods = CatImplDecl->getCatInsMethods();
- for (int i=0; i < CatImplDecl->getNumCatInsMethods(); i++) {
+ ObjcMethodDecl **methods = CatImplDecl->getInstanceMethods();
+ for (int i=0; i < CatImplDecl->getNumInstanceMethods(); i++) {
InsMap[methods[i]->getSelector().getAsOpaquePtr()] = 'a';
}
bool IncompleteImpl = false;
- methods = CatClassDecl->getCatInsMethods();
- for (int j = 0; j < CatClassDecl->getNumCatInsMethods(); j++)
+ methods = CatClassDecl->getInstanceMethods();
+ for (int j = 0; j < CatClassDecl->getNumInstanceMethods(); j++)
if (!InsMap.count(methods[j]->getSelector().getAsOpaquePtr())) {
llvm::SmallString<128> buf;
Diag(methods[j]->getLocation(), diag::warn_undef_method_impl,
@@ -1317,13 +1317,13 @@
llvm::DenseMap<void *, char> ClsMap;
// Check and see if class methods in category interface have been
// implemented in its implementation class.
- methods = CatImplDecl->getCatClsMethods();
- for (int i=0; i < CatImplDecl->getNumCatClsMethods(); i++) {
+ methods = CatImplDecl->getClassMethods();
+ for (int i=0; i < CatImplDecl->getNumClassMethods(); i++) {
ClsMap[methods[i]->getSelector().getAsOpaquePtr()] = 'a';
}
- methods = CatClassDecl->getCatClsMethods();
- for (int j = 0; j < CatClassDecl->getNumCatClsMethods(); j++)
+ methods = CatClassDecl->getClassMethods();
+ for (int j = 0; j < CatClassDecl->getNumClassMethods(); j++)
if (!ClsMap.count(methods[j]->getSelector().getAsOpaquePtr())) {
llvm::SmallString<128> buf;
Diag(methods[j]->getLocation(), diag::warn_undef_method_impl,
@@ -1333,8 +1333,8 @@
// Check the protocol list for unimplemented methods in the @implementation
// class.
- ObjcProtocolDecl** protocols = CatClassDecl->getCatReferencedProtocols();
- for (int i = 0; i < CatClassDecl->getNumCatReferencedProtocols(); i++) {
+ ObjcProtocolDecl** protocols = CatClassDecl->getReferencedProtocols();
+ for (int i = 0; i < CatClassDecl->getNumReferencedProtocols(); i++) {
ObjcProtocolDecl* PDecl = protocols[i];
CheckProtocolMethodDefs(PDecl, IncompleteImpl, InsMap, ClsMap);
}
Modified: cfe/trunk/clang.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/clang.xcodeproj/project.pbxproj?rev=42555&r1=42554&r2=42555&view=diff
==============================================================================
--- cfe/trunk/clang.xcodeproj/project.pbxproj (original)
+++ cfe/trunk/clang.xcodeproj/project.pbxproj Tue Oct 2 17:05:16 2007
@@ -737,6 +737,7 @@
08FB7793FE84155DC02AAC07 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "clang" */;
+ compatibilityVersion = "Xcode 2.4";
hasScannedForEncodings = 1;
mainGroup = 08FB7794FE84155DC02AAC07 /* clang */;
projectDirPath = "";
Modified: cfe/trunk/include/clang/AST/DeclObjC.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclObjC.h?rev=42555&r1=42554&r2=42555&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclObjC.h (original)
+++ cfe/trunk/include/clang/AST/DeclObjC.h Tue Oct 2 17:05:16 2007
@@ -53,20 +53,20 @@
ObjcInterfaceDecl *SuperClass;
/// Protocols referenced in interface header declaration
- ObjcProtocolDecl **IntfRefProtocols; // Null if none
- int NumIntfRefProtocols; // -1 if none
+ ObjcProtocolDecl **ReferencedProtocols; // Null if none
+ int NumReferencedProtocols; // -1 if none
/// Ivars/NumIvars - This is a new[]'d array of pointers to Decls.
ObjcIvarDecl **Ivars; // Null if not defined.
int NumIvars; // -1 if not defined.
/// instance methods
- ObjcMethodDecl **InsMethods; // Null if not defined
- int NumInsMethods; // -1 if not defined
+ ObjcMethodDecl **InstanceMethods; // Null if not defined
+ int NumInstanceMethods; // -1 if not defined
/// class methods
- ObjcMethodDecl **ClsMethods; // Null if not defined
- int NumClsMethods; // -1 if not defined
+ ObjcMethodDecl **ClassMethods; // Null if not defined
+ int NumClassMethods; // -1 if not defined
/// List of categories defined for this class.
ObjcCategoryDecl *ListCategories;
@@ -76,8 +76,10 @@
ObjcInterfaceDecl(SourceLocation L, unsigned numRefProtos,
IdentifierInfo *Id, bool FD = false)
: TypeDecl(ObjcInterface, L, Id, 0), SuperClass(0),
- IntfRefProtocols(0), NumIntfRefProtocols(-1), Ivars(0), NumIvars(-1),
- InsMethods(0), NumInsMethods(-1), ClsMethods(0), NumClsMethods(-1),
+ ReferencedProtocols(0), NumReferencedProtocols(-1), Ivars(0),
+ NumIvars(-1),
+ InstanceMethods(0), NumInstanceMethods(-1),
+ ClassMethods(0), NumClassMethods(-1),
ListCategories(0), ForwardDecl(FD) {
AllocIntfRefProtocols(numRefProtos);
}
@@ -85,24 +87,26 @@
// This is necessary when converting a forward declaration to a definition.
void AllocIntfRefProtocols(unsigned numRefProtos) {
if (numRefProtos) {
- IntfRefProtocols = new ObjcProtocolDecl*[numRefProtos];
- memset(IntfRefProtocols, '\0',
+ ReferencedProtocols = new ObjcProtocolDecl*[numRefProtos];
+ memset(ReferencedProtocols, '\0',
numRefProtos*sizeof(ObjcProtocolDecl*));
- NumIntfRefProtocols = numRefProtos;
+ NumReferencedProtocols = numRefProtos;
}
}
- ObjcProtocolDecl **getIntfRefProtocols() const { return IntfRefProtocols; }
- int getNumIntfRefProtocols() const { return NumIntfRefProtocols; }
+ ObjcProtocolDecl **getReferencedProtocols() const {
+ return ReferencedProtocols;
+ }
+ int getNumIntfRefProtocols() const { return NumReferencedProtocols; }
ObjcIvarDecl **getIntfDeclIvars() const { return Ivars; }
int getIntfDeclNumIvars() const { return NumIvars; }
- ObjcMethodDecl** getInsMethods() const { return InsMethods; }
- int getNumInsMethods() const { return NumInsMethods; }
+ ObjcMethodDecl** getInstanceMethods() const { return InstanceMethods; }
+ int getNumInstanceMethods() const { return NumInstanceMethods; }
- ObjcMethodDecl** getClsMethods() const { return ClsMethods; }
- int getNumClsMethods() const { return NumClsMethods; }
+ ObjcMethodDecl** getClassMethods() const { return ClassMethods; }
+ int getNumClassMethods() const { return NumClassMethods; }
void ObjcAddInstanceVariablesToClass(ObjcIvarDecl **ivars,
unsigned numIvars);
@@ -114,8 +118,8 @@
void setForwardDecl(bool val) { ForwardDecl = val; }
void setIntfRefProtocols(int idx, ObjcProtocolDecl *OID) {
- assert((idx < NumIntfRefProtocols) && "index out of range");
- IntfRefProtocols[idx] = OID;
+ assert((idx < NumReferencedProtocols) && "index out of range");
+ ReferencedProtocols[idx] = OID;
}
ObjcInterfaceDecl *getSuperClass() const { return SuperClass; }
@@ -277,12 +281,12 @@
int NumReferencedProtocols; // -1 if none
/// protocol instance methods
- ObjcMethodDecl **ProtoInsMethods; // Null if not defined
- int NumProtoInsMethods; // -1 if not defined
+ ObjcMethodDecl **InstanceMethods; // Null if not defined
+ int NumInstanceMethods; // -1 if not defined
/// protocol class methods
- ObjcMethodDecl **ProtoClsMethods; // Null if not defined
- int NumProtoClsMethods; // -1 if not defined
+ ObjcMethodDecl **ClassMethods; // Null if not defined
+ int NumClassMethods; // -1 if not defined
bool isForwardProtoDecl; // declared with @protocol.
public:
@@ -290,8 +294,8 @@
IdentifierInfo *Id, bool FD = false)
: TypeDecl(ObjcProtocol, L, Id, 0),
ReferencedProtocols(0), NumReferencedProtocols(-1),
- ProtoInsMethods(0), NumProtoInsMethods(-1),
- ProtoClsMethods(0), NumProtoClsMethods(-1),
+ InstanceMethods(0), NumInstanceMethods(-1),
+ ClassMethods(0), NumClassMethods(-1),
isForwardProtoDecl(FD) {
AllocReferencedProtocols(numRefProtos);
}
@@ -316,11 +320,11 @@
}
int getNumReferencedProtocols() const { return NumReferencedProtocols; }
- ObjcMethodDecl** getInsMethods() const { return ProtoInsMethods; }
- int getNumInsMethods() const { return NumProtoInsMethods; }
+ ObjcMethodDecl** getInstanceMethods() const { return InstanceMethods; }
+ int getNumInstanceMethods() const { return NumInstanceMethods; }
- ObjcMethodDecl** getClsMethods() const { return ProtoClsMethods; }
- int getNumClsMethods() const { return NumProtoClsMethods; }
+ ObjcMethodDecl** getClassMethods() const { return ClassMethods; }
+ int getNumClassMethods() const { return NumClassMethods; }
bool isForwardDecl() const { return isForwardProtoDecl; }
void setForwardDecl(bool val) { isForwardProtoDecl = val; }
@@ -363,20 +367,20 @@
/// @protocol NSTextInput, NSChangeSpelling, NSDraggingInfo;
///
class ObjcForwardProtocolDecl : public TypeDecl {
- ObjcProtocolDecl **ForwardProtocolDecls; // Null if not defined.
- int NumForwardProtocolDecls; // -1 if not defined.
+ ObjcProtocolDecl **ReferencedProtocols; // Null if not defined.
+ int NumReferencedProtocols; // -1 if not defined.
public:
ObjcForwardProtocolDecl(SourceLocation L, unsigned nElts)
: TypeDecl(ObjcForwardProtocol, L, 0, 0) {
if (nElts) {
- ForwardProtocolDecls = new ObjcProtocolDecl*[nElts];
- memset(ForwardProtocolDecls, '\0', nElts*sizeof(ObjcProtocolDecl*));
- NumForwardProtocolDecls = nElts;
+ ReferencedProtocols = new ObjcProtocolDecl*[nElts];
+ memset(ReferencedProtocols, '\0', nElts*sizeof(ObjcProtocolDecl*));
+ NumReferencedProtocols = nElts;
}
}
void setForwardProtocolDecl(int idx, ObjcProtocolDecl *OID) {
- assert((idx < NumForwardProtocolDecls) && "index out of range");
- ForwardProtocolDecls[idx] = OID;
+ assert((idx < NumReferencedProtocols) && "index out of range");
+ ReferencedProtocols[idx] = OID;
}
static bool classof(const Decl *D) {
return D->getKind() == ObjcForwardProtocol;
@@ -409,16 +413,16 @@
IdentifierInfo *ObjcCatName;
/// referenced protocols in this category
- ObjcProtocolDecl **CatReferencedProtocols; // Null if none
- int NumCatReferencedProtocols; // -1 if none
+ ObjcProtocolDecl **ReferencedProtocols; // Null if none
+ int NumReferencedProtocols; // -1 if none
/// category instance methods
- ObjcMethodDecl **CatInsMethods; // Null if not defined
- int NumCatInsMethods; // -1 if not defined
+ ObjcMethodDecl **InstanceMethods; // Null if not defined
+ int NumInstanceMethods; // -1 if not defined
/// category class methods
- ObjcMethodDecl **CatClsMethods; // Null if not defined
- int NumCatClsMethods; // -1 if not defined
+ ObjcMethodDecl **ClassMethods; // Null if not defined
+ int NumClassMethods; // -1 if not defined
/// Next category belonging to this class
ObjcCategoryDecl *NextClassCategory;
@@ -430,15 +434,15 @@
ObjcCategoryDecl(SourceLocation L, unsigned numRefProtocol)
: Decl(ObjcCategory),
ClassInterface(0), ObjcCatName(0),
- CatReferencedProtocols(0), NumCatReferencedProtocols(-1),
- CatInsMethods(0), NumCatInsMethods(-1),
- CatClsMethods(0), NumCatClsMethods(-1),
+ ReferencedProtocols(0), NumReferencedProtocols(-1),
+ InstanceMethods(0), NumInstanceMethods(-1),
+ ClassMethods(0), NumClassMethods(-1),
NextClassCategory(0), CatLoc(L) {
if (numRefProtocol) {
- CatReferencedProtocols = new ObjcProtocolDecl*[numRefProtocol];
- memset(CatReferencedProtocols, '\0',
+ ReferencedProtocols = new ObjcProtocolDecl*[numRefProtocol];
+ memset(ReferencedProtocols, '\0',
numRefProtocol*sizeof(ObjcProtocolDecl*));
- NumCatReferencedProtocols = numRefProtocol;
+ NumReferencedProtocols = numRefProtocol;
}
}
@@ -446,20 +450,20 @@
void setClassInterface(ObjcInterfaceDecl *IDecl) { ClassInterface = IDecl; }
void setCatReferencedProtocols(int idx, ObjcProtocolDecl *OID) {
- assert((idx < NumCatReferencedProtocols) && "index out of range");
- CatReferencedProtocols[idx] = OID;
+ assert((idx < NumReferencedProtocols) && "index out of range");
+ ReferencedProtocols[idx] = OID;
}
- ObjcProtocolDecl **getCatReferencedProtocols() const {
- return CatReferencedProtocols;
+ ObjcProtocolDecl **getReferencedProtocols() const {
+ return ReferencedProtocols;
}
- int getNumCatReferencedProtocols() const { return NumCatReferencedProtocols; }
+ int getNumReferencedProtocols() const { return NumReferencedProtocols; }
- ObjcMethodDecl **getCatInsMethods() const { return CatInsMethods; }
- int getNumCatInsMethods() const { return NumCatInsMethods; }
+ ObjcMethodDecl **getInstanceMethods() const { return InstanceMethods; }
+ int getNumInstanceMethods() const { return NumInstanceMethods; }
- ObjcMethodDecl **getCatClsMethods() const { return CatClsMethods; }
- int getNumCatClsMethods() const { return NumCatClsMethods; }
+ ObjcMethodDecl **getClassMethods() const { return ClassMethods; }
+ int getNumClassMethods() const { return NumClassMethods; }
void ObjcAddCatMethods(ObjcMethodDecl **insMethods, unsigned numInsMembers,
ObjcMethodDecl **clsMethods, unsigned numClsMembers);
@@ -491,12 +495,12 @@
IdentifierInfo *ObjcCatName;
/// category instance methods being implemented
- ObjcMethodDecl **CatInsMethods; // Null if category is not implementing any
- int NumCatInsMethods; // -1 if category is not implementing any
+ ObjcMethodDecl **InstanceMethods; // Null if category is not implementing any
+ int NumInstanceMethods; // -1 if category is not implementing any
/// category class methods being implemented
- ObjcMethodDecl **CatClsMethods; // Null if category is not implementing any
- int NumCatClsMethods; // -1 if category is not implementing any
+ ObjcMethodDecl **ClassMethods; // Null if category is not implementing any
+ int NumClassMethods; // -1 if category is not implementing any
public:
ObjcCategoryImplDecl(SourceLocation L, IdentifierInfo *Id,
@@ -505,8 +509,8 @@
: Decl(ObjcCategoryImpl),
ClassInterface(classInterface),
ObjcCatName(catName),
- CatInsMethods(0), NumCatInsMethods(-1),
- CatClsMethods(0), NumCatClsMethods(-1) {}
+ InstanceMethods(0), NumInstanceMethods(-1),
+ ClassMethods(0), NumClassMethods(-1) {}
ObjcInterfaceDecl *getClassInterface() const {
return ClassInterface;
@@ -514,11 +518,11 @@
IdentifierInfo *getObjcCatName() const { return ObjcCatName; }
- ObjcMethodDecl **getCatInsMethods() const { return CatInsMethods; }
- int getNumCatInsMethods() const { return NumCatInsMethods; }
+ ObjcMethodDecl **getInstanceMethods() const { return InstanceMethods; }
+ int getNumInstanceMethods() const { return NumInstanceMethods; }
- ObjcMethodDecl **getCatClsMethods() const { return CatClsMethods; }
- int getNumCatClsMethods() const { return NumCatClsMethods; }
+ ObjcMethodDecl **getClassMethods() const { return ClassMethods; }
+ int getNumClassMethods() const { return NumClassMethods; }
void ObjcAddCatImplMethods(
ObjcMethodDecl **insMethods, unsigned numInsMembers,
@@ -555,12 +559,12 @@
int NumIvars; // -1 if not defined.
/// implemented instance methods
- ObjcMethodDecl **InsMethods; // Null if not defined
- int NumInsMethods; // -1 if not defined
+ ObjcMethodDecl **InstanceMethods; // Null if not defined
+ int NumInstanceMethods; // -1 if not defined
/// implemented class methods
- ObjcMethodDecl **ClsMethods; // Null if not defined
- int NumClsMethods; // -1 if not defined
+ ObjcMethodDecl **ClassMethods; // Null if not defined
+ int NumClassMethods; // -1 if not defined
public:
ObjcImplementationDecl(SourceLocation L, IdentifierInfo *Id,
@@ -568,7 +572,8 @@
: TypeDecl(ObjcImplementation, L, Id, 0),
SuperClass(superDecl),
Ivars(0), NumIvars(-1),
- InsMethods(0), NumInsMethods(-1), ClsMethods(0), NumClsMethods(-1) {}
+ InstanceMethods(0), NumInstanceMethods(-1),
+ ClassMethods(0), NumClassMethods(-1) {}
void ObjcAddInstanceVariablesToClassImpl(ObjcIvarDecl **ivars,
unsigned numIvars);
@@ -581,11 +586,11 @@
void setImplSuperClass(ObjcInterfaceDecl * superCls)
{ SuperClass = superCls; }
- ObjcMethodDecl **getInsMethods() const { return InsMethods; }
- int getNumInsMethods() const { return NumInsMethods; }
+ ObjcMethodDecl **getInstanceMethods() const { return InstanceMethods; }
+ int getNumInstanceMethods() const { return NumInstanceMethods; }
- ObjcMethodDecl **getClsMethods() const { return ClsMethods; }
- int getNumClsMethods() const { return NumClsMethods; }
+ ObjcMethodDecl **getClassMethods() const { return ClassMethods; }
+ int getNumClassMethods() const { return NumClassMethods; }
static bool classof(const Decl *D) {
return D->getKind() == ObjcImplementation;
More information about the cfe-commits
mailing list