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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user