diff options
| author | John McCall <rjmccall@apple.com> | 2010-12-05 02:00:02 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2010-12-05 02:00:02 +0000 |
| commit | a2342eb8574e4f5ef455424a02c24feb8ce8b2a1 (patch) | |
| tree | 05648d6f71d06f249dff5f424f1b2e7239a8dc28 /clang/lib/CodeGen/CGExprAgg.cpp | |
| parent | 77a11c6174d506f4adfb10a5e4d38606244dad69 (diff) | |
| download | llvm-a2342eb8574e4f5ef455424a02c24feb8ce8b2a1.zip llvm-a2342eb8574e4f5ef455424a02c24feb8ce8b2a1.tar.gz llvm-a2342eb8574e4f5ef455424a02c24feb8ce8b2a1.tar.bz2 | |
Fix a bug in the emission of __real/__imag l-values on scalar operands.
Fix a bug in the emission of complex compound assignment l-values.
Introduce a method to emit an expression whose value isn't relevant.
Make that method evaluate its operand as an l-value if it is one.
Fixes our volatile compliance in C++.
llvm-svn: 120931
Diffstat (limited to 'clang/lib/CodeGen/CGExprAgg.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGExprAgg.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGExprAgg.cpp b/clang/lib/CodeGen/CGExprAgg.cpp index b2679a3..73bb9ef 100644 --- a/clang/lib/CodeGen/CGExprAgg.cpp +++ b/clang/lib/CodeGen/CGExprAgg.cpp @@ -362,7 +362,7 @@ void AggExprEmitter::VisitObjCPropertyRefExpr(ObjCPropertyRefExpr *E) { } void AggExprEmitter::VisitBinComma(const BinaryOperator *E) { - CGF.EmitAnyExpr(E->getLHS(), AggValueSlot::ignored(), true); + CGF.EmitIgnoredExpr(E->getLHS()); Visit(E->getRHS()); } @@ -547,7 +547,7 @@ AggExprEmitter::EmitInitializationToLValue(Expr* E, LValue LV, QualType T) { CGF.EmitAggExpr(E, AggValueSlot::forAddr(LV.getAddress(), false, true, false, Dest.isZeroed())); } else { - CGF.EmitStoreThroughLValue(CGF.EmitAnyExpr(E), LV, T); + CGF.EmitStoreThroughLValue(RValue::get(CGF.EmitScalarExpr(E)), LV, T); } } |
