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 | 119a1c6c4029d30cae7b31a2826aa0ff70d01668 (patch) | |
tree | eaec3cc289e887d12238c3f9b47d706f7312db0a /lib/CodeGen/CGExprCXX.cpp | |
parent | 91252d115bdb6f937192a8dbc86c5abe00101436 (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/CGExprCXX.cpp')
-rw-r--r-- | lib/CodeGen/CGExprCXX.cpp | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/lib/CodeGen/CGExprCXX.cpp b/lib/CodeGen/CGExprCXX.cpp index 883e666a8c..e88315137a 100644 --- a/lib/CodeGen/CGExprCXX.cpp +++ b/lib/CodeGen/CGExprCXX.cpp @@ -124,11 +124,9 @@ RValue CodeGenFunction::EmitCXXMemberCallExpr(const CXXMemberCallExpr *CE, This = EmitScalarExpr(ME->getBase()); else { LValue BaseLV = EmitLValue(ME->getBase()); - if (BaseLV.isPropertyRef() || BaseLV.isKVCRef()) { + if (BaseLV.isPropertyRef()) { QualType QT = ME->getBase()->getType(); - RValue RV = - BaseLV.isPropertyRef() ? EmitLoadOfPropertyRefLValue(BaseLV, QT) - : EmitLoadOfKVCRefLValue(BaseLV, QT); + RValue RV = EmitLoadOfPropertyRefLValue(BaseLV); This = RV.isScalar() ? RV.getScalarVal() : RV.getAggregateAddr(); } else @@ -242,13 +240,10 @@ CodeGenFunction::EmitCXXOperatorMemberCallExpr(const CXXOperatorCallExpr *E, "EmitCXXOperatorMemberCallExpr - user declared copy assignment"); LValue LV = EmitLValue(E->getArg(0)); llvm::Value *This; - if (LV.isPropertyRef() || LV.isKVCRef()) { + if (LV.isPropertyRef()) { AggValueSlot Slot = CreateAggTemp(E->getArg(1)->getType()); EmitAggExpr(E->getArg(1), Slot); - if (LV.isPropertyRef()) - EmitObjCPropertySet(LV.getPropertyRefExpr(), Slot.asRValue()); - else - EmitObjCPropertySet(LV.getKVCRefExpr(), Slot.asRValue()); + EmitStoreThroughPropertyRefLValue(Slot.asRValue(), LV); return RValue::getAggregate(0, false); } else @@ -267,11 +262,9 @@ CodeGenFunction::EmitCXXOperatorMemberCallExpr(const CXXOperatorCallExpr *E, FPT->isVariadic()); LValue LV = EmitLValue(E->getArg(0)); llvm::Value *This; - if (LV.isPropertyRef() || LV.isKVCRef()) { + if (LV.isPropertyRef()) { QualType QT = E->getArg(0)->getType(); - RValue RV = - LV.isPropertyRef() ? EmitLoadOfPropertyRefLValue(LV, QT) - : EmitLoadOfKVCRefLValue(LV, QT); + RValue RV = EmitLoadOfPropertyRefLValue(LV); assert (!RV.isScalar() && "EmitCXXOperatorMemberCallExpr"); This = RV.getAggregateAddr(); } |