diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2008-11-22 22:30:21 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2008-11-22 22:30:21 +0000 |
commit | 43f447098d5e6162fbfb97ed38365284207a7fbe (patch) | |
tree | d47eaf5853b61178aa80a6ae24d317553ca1f6ba /lib/CodeGen/CGExprAgg.cpp | |
parent | 6816856fb1feaf3a8add3d5cd99ec19339849c4e (diff) |
Implemented ir-gen for 'implicit' properties using the new AST nodes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59886 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprAgg.cpp')
-rw-r--r-- | lib/CodeGen/CGExprAgg.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/CodeGen/CGExprAgg.cpp b/lib/CodeGen/CGExprAgg.cpp index 66f3feb8cc..a06d3b63c1 100644 --- a/lib/CodeGen/CGExprAgg.cpp +++ b/lib/CodeGen/CGExprAgg.cpp @@ -229,6 +229,15 @@ void AggExprEmitter::VisitBinAssign(const BinaryOperator *E) { CGF.EmitAggExpr(E->getRHS(), AggLoc, false); CGF.EmitObjCPropertySet(LHS.getPropertyRefExpr(), RValue::getAggregate(AggLoc)); + } + else if (LHS.isKVCRef()) { + // FIXME: Volatility? + llvm::Value *AggLoc = DestPtr; + if (!AggLoc) + AggLoc = CGF.CreateTempAlloca(CGF.ConvertType(E->getRHS()->getType())); + CGF.EmitAggExpr(E->getRHS(), AggLoc, false); + CGF.EmitObjCPropertySet(LHS.getKVCRefExpr(), + RValue::getAggregate(AggLoc)); } else { // Codegen the RHS so that it stores directly into the LHS. CGF.EmitAggExpr(E->getRHS(), LHS.getAddress(), false /*FIXME: VOLATILE LHS*/); |