[cfe-commits] r68064 - /cfe/trunk/include/clang/AST/DeclObjC.h

Fariborz Jahanian fjahanian at apple.com
Mon Mar 30 14:33:57 PDT 2009


Author: fjahanian
Date: Mon Mar 30 16:33:50 2009
New Revision: 68064

URL: http://llvm.org/viewvc/llvm-project?rev=68064&view=rev
Log:
Added new info to property impl. AST node to support
objc2's ivar synthesis.

Modified:
    cfe/trunk/include/clang/AST/DeclObjC.h

Modified: cfe/trunk/include/clang/AST/DeclObjC.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclObjC.h?rev=68064&r1=68063&r2=68064&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/DeclObjC.h (original)
+++ cfe/trunk/include/clang/AST/DeclObjC.h Mon Mar 30 16:33:50 2009
@@ -1091,6 +1091,7 @@
     Dynamic
   };
 private:
+  unsigned IvarKind : 1;
   SourceLocation AtLoc;   // location of @synthesize or @dynamic
   /// Property declaration being implemented
   ObjCPropertyDecl *PropertyDecl;
@@ -1102,7 +1103,7 @@
                        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 @@
   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;





More information about the cfe-commits mailing list