OpInfo.RHS = EmitCast(E->getRHS(), OpInfo.Ty);
LValue LHSLV = CGF.EmitLValue(E->getLHS());
- assert(!LHSLV.isKVCRef() &&
- "setter/getter access of complex using property syntax NYI");
// We know the LHS is a complex lvalue.
ComplexPairTy LHSComplexPair;
if (LHSLV.isPropertyRef())
LHSComplexPair =
CGF.EmitObjCPropertyGet(LHSLV.getPropertyRefExpr()).getComplexVal();
+ else if (LHSLV.isKVCRef())
+ LHSComplexPair =
+ CGF.EmitObjCPropertyGet(LHSLV.getKVCRefExpr()).getComplexVal();
else
LHSComplexPair = EmitLoadOfComplex(LHSLV.getAddress(),
LHSLV.isVolatileQualified());
if (LHSLV.isPropertyRef())
CGF.EmitObjCPropertySet(LHSLV.getPropertyRefExpr(),
RValue::getComplex(Result));
+ else if (LHSLV.isKVCRef())
+ CGF.EmitObjCPropertySet(LHSLV.getKVCRefExpr(), RValue::getComplex(Result));
else
EmitStoreOfComplex(Result, LHSLV.getAddress(), LHSLV.isVolatileQualified());
// And now return the LHS
IgnoreImagAssign = ignimag;
if (LHSLV.isPropertyRef())
return CGF.EmitObjCPropertyGet(LHSLV.getPropertyRefExpr()).getComplexVal();
+ else if (LHSLV.isKVCRef())
+ return CGF.EmitObjCPropertyGet(LHSLV.getKVCRefExpr()).getComplexVal();
return EmitLoadOfComplex(LHSLV.getAddress(), LHSLV.isVolatileQualified());
}