aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-03-30 21:33:50 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-03-30 21:33:50 +0000
commitd497bae0ed149584636f07b638ba8db6e3f0fcb3 (patch)
treeb0e94665e0ff1391f0b1586d49f7d0dcfea08421
parentbe65d908d6da886a03cd2b3a47605e10ee0645f2 (diff)
Added new info to property impl. AST node to support
objc2's ivar synthesis. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68064 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/AST/DeclObjC.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/clang/AST/DeclObjC.h b/include/clang/AST/DeclObjC.h
index 5002a929c7..8ca0a378d7 100644
--- a/include/clang/AST/DeclObjC.h
+++ b/include/clang/AST/DeclObjC.h
@@ -1091,6 +1091,7 @@ public:
Dynamic
};
private:
+ unsigned IvarKind : 1;
SourceLocation AtLoc; // location of @synthesize or @dynamic
/// Property declaration being implemented
ObjCPropertyDecl *PropertyDecl;
@@ -1102,7 +1103,7 @@ private:
ObjCPropertyDecl *property,
Kind PK,
ObjCIvarDecl *ivarDecl)
- : Decl(ObjCPropertyImpl, DC, L), AtLoc(atLoc),
+ : Decl(ObjCPropertyImpl, DC, L), IvarKind(false), AtLoc(atLoc),
PropertyDecl(property), PropertyIvarDecl(ivarDecl) {
assert (PK == Dynamic || PropertyIvarDecl);
}
@@ -1127,6 +1128,16 @@ public:
ObjCIvarDecl *getPropertyIvarDecl() const {
return PropertyIvarDecl;
}
+ void SetPropertyIvarDecl(ObjCIvarDecl *Ivar) {
+ assert(PropertyIvarDecl && "PropertyIvarDecl is already defined");
+ PropertyIvarDecl = Ivar;
+ }
+ void SetIvarSynthesized() {
+ IvarKind = true;
+ }
+ bool IsIvarSynthesized() const {
+ return IvarKind;
+ }
static bool classof(const Decl *D) {
return D->getKind() == ObjCPropertyImpl;