// Store the result value into the LHS lvalue.
CGF.EmitStoreThroughLValue(RValue::get(Result), LHSLV, E->getType());
+ // For bitfields, we need the value in the bitfield
+ // FIXME: This adds an extra bitfield load
+ if (LHSLV.isBitfield())
+ Result = EmitLoadOfLValue(LHSLV, LHSTy);
+
return Result;
}
// Store the value into the LHS.
// FIXME: Volatility!
CGF.EmitStoreThroughLValue(RValue::get(RHS), LHS, E->getType());
-
+
+ // For bitfields, we need the value in the bitfield
+ // FIXME: This adds an extra bitfield load
+ if (LHS.isBitfield())
+ return EmitLoadOfLValue(LHS, E->getLHS()->getType());
// Return the RHS.
return RHS;
}