diff options
author | John McCall <rjmccall@apple.com> | 2010-12-04 02:32:38 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-12-04 02:32:38 +0000 |
commit | f3eb96fccf373f429ff1fefb51ae5eacad95cf81 (patch) | |
tree | 6527dc0d7b2306058a2323ce9b43d07e2a8ed9eb /clang/lib/CodeGen/CGExprAgg.cpp | |
parent | 7788e5fd642718993f3f70fff9d3f2030474f3cd (diff) | |
download | bcm5719-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/CGExprAgg.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGExprAgg.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CGExprAgg.cpp b/clang/lib/CodeGen/CGExprAgg.cpp index 79ba32f0761..9e4e7dcc534 100644 --- a/clang/lib/CodeGen/CGExprAgg.cpp +++ b/clang/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()) |