Skip to content

Commit d40a558

Browse files
committed
Change signature of emitStoreThroughBitfieldLValue
1 parent 6a403cf commit d40a558

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

clang/lib/CIR/CodeGen/CIRGenExpr.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,11 +257,10 @@ void CIRGenFunction::emitStoreOfScalar(mlir::Value value, Address addr,
257257
assert(!cir::MissingFeatures::opTBAA());
258258
}
259259

260-
void CIRGenFunction::emitStoreThroughBitfieldLValue(RValue src, LValue dst,
261-
mlir::Value &result) {
260+
mlir::Value CIRGenFunction::emitStoreThroughBitfieldLValue(RValue src, LValue dst) {
262261
assert(!cir::MissingFeatures::bitfields());
263262
cgm.errorNYI("bitfields");
264-
result = {};
263+
return {};
265264
}
266265

267266
mlir::Value CIRGenFunction::emitToMemory(mlir::Value value, QualType ty) {

clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@ class ScalarExprEmitter : public StmtVisitor<ScalarExprEmitter, mlir::Value> {
847847
// 'An assignment expression has the value of the left operand after the
848848
// assignment...'.
849849
if (lhs.isBitField()) {
850-
cgf.emitStoreThroughBitfieldLValue(RValue::get(rhs), lhs, rhs);
850+
rhs = cgf.emitStoreThroughBitfieldLValue(RValue::get(rhs), lhs);
851851
} else {
852852
cgf.emitNullabilityCheck(lhs, rhs, e->getExprLoc());
853853
CIRGenFunction::SourceLocRAIIObject loc{

clang/lib/CIR/CodeGen/CIRGenFunction.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -579,8 +579,7 @@ class CIRGenFunction : public CIRGenTypeCache {
579579
/// is 'Ty'.
580580
void emitStoreThroughLValue(RValue src, LValue dst, bool isInit = false);
581581

582-
void emitStoreThroughBitfieldLValue(RValue src, LValue dst,
583-
mlir::Value &result);
582+
mlir::Value emitStoreThroughBitfieldLValue(RValue src, LValue dstresult);
584583

585584
/// Given a value and its clang type, returns the value casted to its memory
586585
/// representation.

0 commit comments

Comments
 (0)