Kill the KVC l-value kind and calculate the base expression when emitting

the l-value.

llvm-svn: 120884
This commit is contained in:
John McCall
2010-12-04 02:32:38 +00:00
parent 7788e5fd64
commit f3eb96fccf
8 changed files with 62 additions and 140 deletions

View File

@@ -1127,9 +1127,7 @@ Value *ScalarExprEmitter::EmitCastExpr(CastExpr *CE) {
if (E->Classify(CGF.getContext()).isGLValue()) {
LValue LV = CGF.EmitLValue(E);
if (LV.isPropertyRef())
CGF.EmitLoadOfPropertyRefLValue(LV, E->getType());
else if (LV.isKVCRef())
CGF.EmitLoadOfKVCRefLValue(LV, E->getType());
CGF.EmitLoadOfPropertyRefLValue(LV);
}
else
CGF.EmitAnyExpr(E, AggValueSlot::ignored(), true);
@@ -1583,7 +1581,7 @@ Value *ScalarExprEmitter::EmitCompoundAssign(const CompoundAssignOperator *E,
return RHS;
// Objective-C property assignment never reloads the value following a store.
if (LHS.isPropertyRef() || LHS.isKVCRef())
if (LHS.isPropertyRef())
return RHS;
// If the lvalue is non-volatile, return the computed value of the assignment.
@@ -2183,7 +2181,7 @@ Value *ScalarExprEmitter::VisitBinAssign(const BinaryOperator *E) {
return RHS;
// Objective-C property assignment never reloads the value following a store.
if (LHS.isPropertyRef() || LHS.isKVCRef())
if (LHS.isPropertyRef())
return RHS;
// If the lvalue is non-volatile, return the computed value of the assignment.