From: Fariborz Jahanian Date: Mon, 30 Mar 2009 21:33:50 +0000 (+0000) Subject: Added new info to property impl. AST node to support X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d497bae0ed149584636f07b638ba8db6e3f0fcb3;p=clang 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 --- 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;