@@ -69,7 +69,7 @@ struct ConstantAggregateBuilderUtils {
69
69
mlir::TypedAttr getPadding (CharUnits size) const {
70
70
auto eltTy = CGM.UCharTy ;
71
71
auto arSize = size.getQuantity ();
72
- auto & bld = CGM.getBuilder ();
72
+ auto & bld = CGM.getBuilder ();
73
73
SmallVector<mlir::Attribute, 4 > elts (arSize, bld.getZeroAttr (eltTy));
74
74
return bld.getConstArray (mlir::ArrayAttr::get (bld.getContext (), elts),
75
75
bld.getArrayType (eltTy, arSize));
@@ -227,8 +227,8 @@ bool ConstantAggregateBuilder::addBits(llvm::APInt Bits, uint64_t OffsetInBits,
227
227
228
228
if (WantedBits == CharWidth) {
229
229
// Got a full byte: just add it directly.
230
- add (mlir::cir::IntAttr::get (charTy, BitsThisChar),
231
- OffsetInChars, AllowOverwrite);
230
+ add (mlir::cir::IntAttr::get (charTy, BitsThisChar), OffsetInChars,
231
+ AllowOverwrite);
232
232
} else {
233
233
// Partial byte: update the existing integer if there is one. If we
234
234
// can't split out a 1-CharUnit range to update, then we can't add
@@ -253,8 +253,8 @@ bool ConstantAggregateBuilder::addBits(llvm::APInt Bits, uint64_t OffsetInBits,
253
253
BitsThisChar &= UpdateMask;
254
254
bool isNull = false ;
255
255
if (*FirstElemToUpdate < Elems.size ()) {
256
- auto firstEltToUpdate =
257
- dyn_cast<mlir::cir::IntAttr>(Elems[*FirstElemToUpdate]);
256
+ auto firstEltToUpdate =
257
+ dyn_cast<mlir::cir::IntAttr>(Elems[*FirstElemToUpdate]);
258
258
isNull = firstEltToUpdate && firstEltToUpdate.isNullValue ();
259
259
}
260
260
@@ -277,7 +277,7 @@ bool ConstantAggregateBuilder::addBits(llvm::APInt Bits, uint64_t OffsetInBits,
277
277
" unexpectedly overwriting bitfield" );
278
278
BitsThisChar |= (CI.getValue () & ~UpdateMask);
279
279
Elems[*FirstElemToUpdate] =
280
- CGM.getBuilder ().getAttr <mlir::cir::IntAttr>(charTy, BitsThisChar);
280
+ CGM.getBuilder ().getAttr <mlir::cir::IntAttr>(charTy, BitsThisChar);
281
281
}
282
282
}
283
283
@@ -422,7 +422,7 @@ mlir::Attribute ConstantAggregateBuilder::buildFrom(
422
422
if (desired.isLayoutIdentical (strType))
423
423
strType = desired;
424
424
425
- return builder.getConstStructOrZeroAttr (arrAttr, Packed, strType);
425
+ return builder.getConstStructOrZeroAttr (arrAttr, Packed, strType);
426
426
}
427
427
428
428
void ConstantAggregateBuilder::condense (CharUnits Offset,
@@ -521,8 +521,7 @@ bool ConstStructBuilder::AppendBitField(const FieldDecl *Field,
521
521
uint64_t FieldOffset,
522
522
mlir::cir::IntAttr CI,
523
523
bool AllowOverwrite) {
524
- const auto &RL =
525
- CGM.getTypes ().getCIRGenRecordLayout (Field->getParent ());
524
+ const auto &RL = CGM.getTypes ().getCIRGenRecordLayout (Field->getParent ());
526
525
const auto &Info = RL.getBitFieldInfo (Field);
527
526
llvm::APInt FieldValue = CI.getValue ();
528
527
0 commit comments