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 | 9ac535162b9d984ea1e93b59a55fed79bdd33a29 (patch) | |
tree | 196d00812f4460aa8ca709053f3c15c34f09423f /clang/lib/CodeGen/CGExprAgg.cpp | |
parent | 6cae80da202053bda44b3ca2bca44b4db50f1d7f (diff) | |
download | bcm5719-llvm-9ac535162b9d984ea1e93b59a55fed79bdd33a29.tar.gz bcm5719-llvm-9ac535162b9d984ea1e93b59a55fed79bdd33a29.zip |
Implemented ir-gen for 'implicit' properties using the new AST nodes.
llvm-svn: 59886
Diffstat (limited to 'clang/lib/CodeGen/CGExprAgg.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGExprAgg.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGExprAgg.cpp b/clang/lib/CodeGen/CGExprAgg.cpp index 66f3feb8cc4..a06d3b63c16 100644 --- a/clang/lib/CodeGen/CGExprAgg.cpp +++ b/clang/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*/); |