]> granicus.if.org Git - clang/commitdiff
Added new info to property impl. AST node to support
authorFariborz Jahanian <fjahanian@apple.com>
Mon, 30 Mar 2009 21:33:50 +0000 (21:33 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Mon, 30 Mar 2009 21:33:50 +0000 (21:33 +0000)
objc2's ivar synthesis.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68064 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/DeclObjC.h

index 5002a929c718bc39ba48688c872d31b8601939ce..8ca0a378d766472223c60971f7c0c98d46845d5c 100644 (file)
@@ -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;