Skip to content

Commit fca1a43

Browse files
committed
clang-format applied
1 parent deed5be commit fca1a43

File tree

4 files changed

+14
-15
lines changed

4 files changed

+14
-15
lines changed

clang/include/clang/CIR/Dialect/IR/CIRTypes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ class StructType
169169
uint64_t getPreferredAlignment(const DataLayout &dataLayout,
170170
DataLayoutEntryListRef params) const;
171171

172-
bool isLayoutIdentical(const StructType& other);
172+
bool isLayoutIdentical(const StructType &other);
173173

174174
// Utilities for lazily computing and cacheing data layout info.
175175
private:

clang/lib/CIR/CodeGen/CIRGenBuilder.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -464,10 +464,10 @@ class CIRGenBuilderTy : public CIRBaseBuilderTy {
464464
return type;
465465
}
466466

467-
mlir::cir::StructType getCompleteStructType(mlir::ArrayAttr fields,
468-
bool packed = false,
469-
llvm::StringRef name = "",
470-
const clang::RecordDecl *ast = nullptr) {
467+
mlir::cir::StructType
468+
getCompleteStructType(mlir::ArrayAttr fields, bool packed = false,
469+
llvm::StringRef name = "",
470+
const clang::RecordDecl *ast = nullptr) {
471471
llvm::SmallVector<mlir::Type, 8> members;
472472
for (auto &attr : fields) {
473473
const auto typedAttr = attr.dyn_cast<mlir::TypedAttr>();

clang/lib/CIR/CodeGen/CIRGenExprConst.cpp

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ struct ConstantAggregateBuilderUtils {
6969
mlir::TypedAttr getPadding(CharUnits size) const {
7070
auto eltTy = CGM.UCharTy;
7171
auto arSize = size.getQuantity();
72-
auto& bld = CGM.getBuilder();
72+
auto &bld = CGM.getBuilder();
7373
SmallVector<mlir::Attribute, 4> elts(arSize, bld.getZeroAttr(eltTy));
7474
return bld.getConstArray(mlir::ArrayAttr::get(bld.getContext(), elts),
7575
bld.getArrayType(eltTy, arSize));
@@ -227,8 +227,8 @@ bool ConstantAggregateBuilder::addBits(llvm::APInt Bits, uint64_t OffsetInBits,
227227

228228
if (WantedBits == CharWidth) {
229229
// 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);
232232
} else {
233233
// Partial byte: update the existing integer if there is one. If we
234234
// 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,
253253
BitsThisChar &= UpdateMask;
254254
bool isNull = false;
255255
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]);
258258
isNull = firstEltToUpdate && firstEltToUpdate.isNullValue();
259259
}
260260

@@ -277,7 +277,7 @@ bool ConstantAggregateBuilder::addBits(llvm::APInt Bits, uint64_t OffsetInBits,
277277
"unexpectedly overwriting bitfield");
278278
BitsThisChar |= (CI.getValue() & ~UpdateMask);
279279
Elems[*FirstElemToUpdate] =
280-
CGM.getBuilder().getAttr<mlir::cir::IntAttr>(charTy, BitsThisChar);
280+
CGM.getBuilder().getAttr<mlir::cir::IntAttr>(charTy, BitsThisChar);
281281
}
282282
}
283283

@@ -422,7 +422,7 @@ mlir::Attribute ConstantAggregateBuilder::buildFrom(
422422
if (desired.isLayoutIdentical(strType))
423423
strType = desired;
424424

425-
return builder.getConstStructOrZeroAttr(arrAttr, Packed, strType);
425+
return builder.getConstStructOrZeroAttr(arrAttr, Packed, strType);
426426
}
427427

428428
void ConstantAggregateBuilder::condense(CharUnits Offset,
@@ -521,8 +521,7 @@ bool ConstStructBuilder::AppendBitField(const FieldDecl *Field,
521521
uint64_t FieldOffset,
522522
mlir::cir::IntAttr CI,
523523
bool AllowOverwrite) {
524-
const auto &RL =
525-
CGM.getTypes().getCIRGenRecordLayout(Field->getParent());
524+
const auto &RL = CGM.getTypes().getCIRGenRecordLayout(Field->getParent());
526525
const auto &Info = RL.getBitFieldInfo(Field);
527526
llvm::APInt FieldValue = CI.getValue();
528527

clang/lib/CIR/Dialect/IR/CIRTypes.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ void StructType::complete(ArrayRef<Type> members, bool packed,
350350
llvm_unreachable("failed to complete struct");
351351
}
352352

353-
bool StructType::isLayoutIdentical(const StructType& other) {
353+
bool StructType::isLayoutIdentical(const StructType &other) {
354354
if (getImpl() == other.getImpl())
355355
return true;
356356

0 commit comments

Comments
 (0)