aboutsummaryrefslogtreecommitdiff
path: root/include/clang
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2008-05-06 18:09:04 +0000
committerFariborz Jahanian <fjahanian@apple.com>2008-05-06 18:09:04 +0000
commit5251e130a23d997f7c0dfdc250cdc41f179e5bed (patch)
treee95dcb68dd2eca8c7c92dc561e02f10c9e2cd037 /include/clang
parent1bffd7471bf3d392a3bc0e241c8d169cbde96156 (diff)
Patch to refactor setter/getter names of property attributes into Selector
(was IdentifierInfo * before). This will make method declartations whole lot easier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50747 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r--include/clang/AST/DeclObjC.h15
-rw-r--r--include/clang/Parse/Action.h1
-rw-r--r--include/clang/Parse/DeclSpec.h3
3 files changed, 11 insertions, 8 deletions
diff --git a/include/clang/AST/DeclObjC.h b/include/clang/AST/DeclObjC.h
index 7947b3dc38..509f0e0747 100644
--- a/include/clang/AST/DeclObjC.h
+++ b/include/clang/AST/DeclObjC.h
@@ -1075,12 +1075,13 @@ private:
// @required/@optional
unsigned PropertyImplementation : 2;
- IdentifierInfo *GetterName; // getter name of NULL if no getter
- IdentifierInfo *SetterName; // setter name of NULL if no setter
+ Selector GetterName; // getter name of NULL if no getter
+ Selector SetterName; // setter name of NULL if no setter
ObjCPropertyDecl(SourceLocation L, IdentifierInfo *Id, QualType T)
: NamedDecl(ObjCProperty, L, Id), DeclType(T),
- PropertyAttributes(OBJC_PR_noattr), GetterName(0), SetterName(0) {}
+ PropertyAttributes(OBJC_PR_noattr), GetterName(Selector()),
+ SetterName(Selector()) {}
public:
static ObjCPropertyDecl *Create(ASTContext &C, SourceLocation L,
IdentifierInfo *Id, QualType T,
@@ -1095,11 +1096,11 @@ public:
PropertyAttributes |= PRVal;
}
- IdentifierInfo *getGetterName() const { return GetterName; }
- void setGetterName(IdentifierInfo *Id) { GetterName = Id; }
+ Selector getGetterName() const { return GetterName; }
+ void setGetterName(Selector Sel) { GetterName = Sel; }
- IdentifierInfo *getSetterName() const { return SetterName; }
- void setSetterName(IdentifierInfo *Id) { SetterName = Id; }
+ Selector getSetterName() const { return SetterName; }
+ void setSetterName(Selector Sel) { SetterName = Sel; }
// Related to @optional/@required declared in @protocol
void setPropertyImplementation(PropertyControl pc) {
diff --git a/include/clang/Parse/Action.h b/include/clang/Parse/Action.h
index 5d094ae892..17899d41d7 100644
--- a/include/clang/Parse/Action.h
+++ b/include/clang/Parse/Action.h
@@ -686,6 +686,7 @@ public:
// ActOnProperty - called to build one property AST
virtual DeclTy *ActOnProperty (Scope *S, SourceLocation AtLoc,
FieldDeclarator &FD, ObjCDeclSpec &ODS,
+ Selector GetterSel, Selector SetterSel,
tok::ObjCKeywordKind MethodImplKind) {
return 0;
}
diff --git a/include/clang/Parse/DeclSpec.h b/include/clang/Parse/DeclSpec.h
index 4bd6204b04..369aca480d 100644
--- a/include/clang/Parse/DeclSpec.h
+++ b/include/clang/Parse/DeclSpec.h
@@ -329,7 +329,8 @@ public:
};
- ObjCDeclSpec() : objcDeclQualifier(DQ_None), PropertyAttributes(DQ_PR_noattr)
+ ObjCDeclSpec() : objcDeclQualifier(DQ_None), PropertyAttributes(DQ_PR_noattr),
+ GetterName(0), SetterName(0)
{}
ObjCDeclQualifier getObjCDeclQualifier() const { return objcDeclQualifier; }
void setObjCDeclQualifier(ObjCDeclQualifier DQVal)