mirror of
https://github.com/intel/llvm.git
synced 2026-02-06 06:31:50 +08:00
The new correct compound assignment operators exposed a bug in codegen.
llvm-svn: 41405
This commit is contained in:
@@ -430,8 +430,8 @@ Value *ScalarExprEmitter::EmitCompoundAssign(const BinaryOperator *E,
|
||||
ComputeType).getVal();
|
||||
|
||||
// Do not merge types for -= where the LHS is a pointer.
|
||||
if (E->getOpcode() != BinaryOperator::SubAssign &&
|
||||
E->getLHS()->getType()->isPointerType()) {
|
||||
if (E->getOpcode() != BinaryOperator::SubAssign ||
|
||||
!E->getLHS()->getType()->isPointerType()) {
|
||||
OpInfo.RHS = CGF.EmitConversion(RValue::get(OpInfo.RHS), RHSTy,
|
||||
ComputeType).getVal();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user