summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGValue.h
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-12-04 02:32:38 +0000
committerJohn McCall <rjmccall@apple.com>2010-12-04 02:32:38 +0000
commitf3eb96fccf373f429ff1fefb51ae5eacad95cf81 (patch)
tree6527dc0d7b2306058a2323ce9b43d07e2a8ed9eb /clang/lib/CodeGen/CGValue.h
parent7788e5fd642718993f3f70fff9d3f2030474f3cd (diff)
downloadbcm5719-llvm-f3eb96fccf373f429ff1fefb51ae5eacad95cf81.tar.gz
bcm5719-llvm-f3eb96fccf373f429ff1fefb51ae5eacad95cf81.zip
Kill the KVC l-value kind and calculate the base expression when emitting
the l-value. llvm-svn: 120884
Diffstat (limited to 'clang/lib/CodeGen/CGValue.h')
-rw-r--r--clang/lib/CodeGen/CGValue.h29
1 files changed, 8 insertions, 21 deletions
diff --git a/clang/lib/CodeGen/CGValue.h b/clang/lib/CodeGen/CGValue.h
index b7bb9d76a48..30c872a8d52 100644
--- a/clang/lib/CodeGen/CGValue.h
+++ b/clang/lib/CodeGen/CGValue.h
@@ -108,10 +108,8 @@ class LValue {
VectorElt, // This is a vector element l-value (V[i]), use getVector*
BitField, // This is a bitfield l-value, use getBitfield*.
ExtVectorElt, // This is an extended vector subset, use getExtVectorComp
- PropertyRef, // This is an Objective-C property reference, use
+ PropertyRef // This is an Objective-C property reference, use
// getPropertyRefExpr
- KVCRef // This is an objective-c 'implicit' property ref,
- // use getKVCRefExpr
} LVType;
llvm::Value *V;
@@ -177,7 +175,6 @@ public:
bool isBitField() const { return LVType == BitField; }
bool isExtVectorElt() const { return LVType == ExtVectorElt; }
bool isPropertyRef() const { return LVType == PropertyRef; }
- bool isKVCRef() const { return LVType == KVCRef; }
bool isVolatileQualified() const { return Quals.hasVolatile(); }
bool isRestrictQualified() const { return Quals.hasRestrict(); }
@@ -245,14 +242,12 @@ public:
}
// property ref lvalue
- const ObjCPropertyRefExpr *getPropertyRefExpr() const {
+ llvm::Value *getPropertyRefBaseAddr() const {
assert(isPropertyRef());
- return PropertyRefExpr;
+ return V;
}
-
- // 'implicit' property ref lvalue
- const ObjCPropertyRefExpr *getKVCRefExpr() const {
- assert(isKVCRef());
+ const ObjCPropertyRefExpr *getPropertyRefExpr() const {
+ assert(isPropertyRef());
return PropertyRefExpr;
}
@@ -309,20 +304,12 @@ public:
// the lvalue. However, this complicates the code a bit, and I haven't figured
// out how to make it go wrong yet.
static LValue MakePropertyRef(const ObjCPropertyRefExpr *E,
- unsigned CVR) {
+ llvm::Value *Base) {
LValue R;
R.LVType = PropertyRef;
+ R.V = Base;
R.PropertyRefExpr = E;
- R.Initialize(Qualifiers::fromCVRMask(CVR));
- return R;
- }
-
- static LValue MakeKVCRef(const ObjCPropertyRefExpr *E,
- unsigned CVR) {
- LValue R;
- R.LVType = KVCRef;
- R.PropertyRefExpr = E;
- R.Initialize(Qualifiers::fromCVRMask(CVR));
+ R.Initialize(Qualifiers());
return R;
}
};
OpenPOWER on IntegriCloud