aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprAgg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/CGExprAgg.cpp')
-rw-r--r--lib/CodeGen/CGExprAgg.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/CGExprAgg.cpp b/lib/CodeGen/CGExprAgg.cpp
index 97754d5c0b..0fa143391d 100644
--- a/lib/CodeGen/CGExprAgg.cpp
+++ b/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);