aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprAgg.cpp
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
commit119a1c6c4029d30cae7b31a2826aa0ff70d01668 (patch)
treeeaec3cc289e887d12238c3f9b47d706f7312db0a /lib/CodeGen/CGExprAgg.cpp
parent91252d115bdb6f937192a8dbc86c5abe00101436 (diff)
Kill the KVC l-value kind and calculate the base expression when emitting
the l-value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120884 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprAgg.cpp')
-rw-r--r--lib/CodeGen/CGExprAgg.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/CodeGen/CGExprAgg.cpp b/lib/CodeGen/CGExprAgg.cpp
index 79ba32f076..9e4e7dcc53 100644
--- a/lib/CodeGen/CGExprAgg.cpp
+++ b/lib/CodeGen/CGExprAgg.cpp
@@ -349,7 +349,8 @@ void AggExprEmitter::VisitObjCMessageExpr(ObjCMessageExpr *E) {
}
void AggExprEmitter::VisitObjCPropertyRefExpr(ObjCPropertyRefExpr *E) {
- RValue RV = CGF.EmitObjCPropertyGet(E, getReturnValueSlot());
+ RValue RV = CGF.EmitLoadOfPropertyRefLValue(CGF.EmitObjCPropertyRefLValue(E),
+ getReturnValueSlot());
EmitGCMove(E, RV);
}
@@ -388,11 +389,7 @@ void AggExprEmitter::VisitBinAssign(const BinaryOperator *E) {
if (LHS.isPropertyRef()) {
AggValueSlot Slot = EnsureSlot(E->getRHS()->getType());
CGF.EmitAggExpr(E->getRHS(), Slot);
- CGF.EmitObjCPropertySet(LHS.getPropertyRefExpr(), Slot.asRValue());
- } else if (LHS.isKVCRef()) {
- AggValueSlot Slot = EnsureSlot(E->getRHS()->getType());
- CGF.EmitAggExpr(E->getRHS(), Slot);
- CGF.EmitObjCPropertySet(LHS.getKVCRefExpr(), Slot.asRValue());
+ CGF.EmitStoreThroughPropertyRefLValue(Slot.asRValue(), LHS);
} else {
bool GCollection = false;
if (CGF.getContext().getLangOptions().getGCMode())