From c4a2d3259f9ed5de325f13db44966db7f19c177d Mon Sep 17 00:00:00 2001 From: John McCall Date: Tue, 25 Oct 2011 07:27:56 +0000 Subject: Introduce a placeholder type for "pseudo object" expressions: expressions which refer to a logical rather than a physical l-value, where the logical object is actually accessed via custom getter/setter code. A subsequent patch will generalize the AST for these so that arbitrary "implementing" sub-expressions can be provided. Right now the only client is ObjC properties, but this should be generalizable to similar language features, e.g. Managed C++'s __property methods. llvm-svn: 142914 --- clang/lib/CodeGen/CGExprAgg.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib/CodeGen/CGExprAgg.cpp') diff --git a/clang/lib/CodeGen/CGExprAgg.cpp b/clang/lib/CodeGen/CGExprAgg.cpp index 97754d5c0ba..0fa143391d6 100644 --- a/clang/lib/CodeGen/CGExprAgg.cpp +++ b/clang/lib/CodeGen/CGExprAgg.cpp @@ -326,7 +326,8 @@ void AggExprEmitter::VisitCastExpr(CastExpr *E) { } case CK_GetObjCProperty: { - LValue LV = CGF.EmitLValue(E->getSubExpr()); + LValue LV = + CGF.EmitObjCPropertyRefLValue(E->getSubExpr()->getObjCProperty()); assert(LV.isPropertyRef()); RValue RV = CGF.EmitLoadOfPropertyRefLValue(LV, getReturnValueSlot()); EmitMoveFromReturnSlot(E, RV); -- cgit v1.2.3