aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGValue.h
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2008-11-20 20:53:20 +0000
committerFariborz Jahanian <fjahanian@apple.com>2008-11-20 20:53:20 +0000
commitd1cc8040ea57775e52d23765a9a6c1fa4b75526f (patch)
tree4d4fcc47b50803ea159c7f9463408882c2e2b0bc /lib/CodeGen/CGValue.h
parent89d7ee9619d2dbdfa8d956a695c612a104a92cad (diff)
Support generation of objc_assign_ivar for ivar
write-barriers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59748 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGValue.h')
-rw-r--r--lib/CodeGen/CGValue.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/CodeGen/CGValue.h b/lib/CodeGen/CGValue.h
index 5b6283f3c6..3cf5d4a7d9 100644
--- a/lib/CodeGen/CGValue.h
+++ b/lib/CodeGen/CGValue.h
@@ -137,8 +137,12 @@ class LValue {
// FIXME: set but never used, what effect should it have?
bool Restrict:1;
+ // objective-c's ivar
+ bool Ivar:1;
+
// objective-c's gc attributes
unsigned ObjCType : 2;
+
private:
static void SetQualifiers(unsigned Qualifiers, LValue& R) {
@@ -147,6 +151,7 @@ private:
// FIXME: Convenient place to set objc flags to 0. This
// should really be done in a user-defined constructor instead.
R.ObjCType = None;
+ R.Ivar = false;
}
public:
@@ -159,9 +164,14 @@ public:
bool isVolatileQualified() const { return Volatile; }
bool isRestrictQualified() const { return Restrict; }
+ bool isObjCIvar() const { return Ivar; }
bool isObjCWeak() const { return ObjCType == Weak; }
bool isObjCStrong() const { return ObjCType == Strong; }
+ static void SetObjCIvar(LValue& R) {
+ R.Ivar = true;
+ }
+
static void SetObjCType(bool isWeak, bool isStrong, LValue& R) {
assert(!(isWeak == true && isStrong == true));
if (isWeak)