diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-01-12 23:27:26 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-01-12 23:27:26 +0000 |
commit | 35c33293efae24750bccdb88798361c59618d97e (patch) | |
tree | 498fb98344ee1e33fa8cfdcef4ee85eda9adda3d /lib/CodeGen/CGExpr.cpp | |
parent | 482b77d1cb4ca08391d1f749436f092a4cc24427 (diff) |
Patch to implement code gen for aggrgate-valued property used
to access a field of its type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62123 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
-rw-r--r-- | lib/CodeGen/CGExpr.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index 20a7693faf..2d51efa474 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -802,6 +802,14 @@ LValue CodeGenFunction::EmitMemberExpr(const MemberExpr *E) { isUnion = true; CVRQualifiers = PTy->getPointeeType().getCVRQualifiers(); } + else if (BaseExpr->getStmtClass() == Expr::ObjCPropertyRefExprClass || + BaseExpr->getStmtClass() == Expr::ObjCKVCRefExprClass) { + RValue RV = EmitObjCPropertyGet(BaseExpr); + BaseValue = RV.getAggregateAddr(); + if (BaseExpr->getType()->isUnionType()) + isUnion = true; + CVRQualifiers = BaseExpr->getType().getCVRQualifiers(); + } else { LValue BaseLV = EmitLValue(BaseExpr); if (BaseLV.isObjCIvar()) |