Skip to content

Commit 0d8a2c3

Browse files
committed
clang-format
1 parent 840e723 commit 0d8a2c3

File tree

82 files changed

+1484
-1834
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+1484
-1834
lines changed

clang/include/clang/CIR/ABIArgInfo.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,7 @@ class ABIArgInfo {
167167
}
168168
static ABIArgInfo getZeroExtend(mlir::Type Ty, mlir::Type T = nullptr) {
169169
// NOTE(cir): Enumerations are IntTypes in CIR.
170-
assert(mlir::isa<cir::IntType>(Ty) ||
171-
mlir::isa<cir::BoolType>(Ty));
170+
assert(mlir::isa<cir::IntType>(Ty) || mlir::isa<cir::BoolType>(Ty));
172171
auto AI = ABIArgInfo(Extend);
173172
AI.setCoerceToType(T);
174173
AI.setPaddingType(nullptr);
@@ -190,8 +189,7 @@ class ABIArgInfo {
190189
// NOTE(cir): The original can apply this method on both integers and
191190
// enumerations, but in CIR, these two types are one and the same. Booleans
192191
// will also fall into this category, but they have their own type.
193-
if (mlir::isa<cir::IntType>(Ty) &&
194-
mlir::cast<cir::IntType>(Ty).isSigned())
192+
if (mlir::isa<cir::IntType>(Ty) && mlir::cast<cir::IntType>(Ty).isSigned())
195193
return getSignExtend(mlir::cast<cir::IntType>(Ty), T);
196194
return getZeroExtend(Ty, T);
197195
}

clang/include/clang/CIR/Dialect/Builder/CIRBaseBuilder.h

Lines changed: 101 additions & 131 deletions
Large diffs are not rendered by default.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ class CIRDataLayout {
102102

103103
mlir::Type getIntPtrType(mlir::Type Ty) const {
104104
assert(mlir::isa<cir::PointerType>(Ty) && "Expected pointer type");
105-
auto IntTy = cir::IntType::get(Ty.getContext(),
106-
getPointerTypeSizeInBits(Ty), false);
105+
auto IntTy =
106+
cir::IntType::get(Ty.getContext(), getPointerTypeSizeInBits(Ty), false);
107107
return IntTy;
108108
}
109109
};

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

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ struct StructTypeStorage;
7070
/// "Node">>}>
7171
/// ```
7272
class StructType
73-
: public mlir::Type::TypeBase<StructType, mlir::Type, detail::StructTypeStorage,
74-
mlir::DataLayoutTypeInterface::Trait,
75-
mlir::TypeTrait::IsMutable> {
73+
: public mlir::Type::TypeBase<
74+
StructType, mlir::Type, detail::StructTypeStorage,
75+
mlir::DataLayoutTypeInterface::Trait, mlir::TypeTrait::IsMutable> {
7676
// FIXME(cir): migrate this type to Tablegen once mutable types are supported.
7777
public:
7878
using Base::Base;
@@ -84,34 +84,38 @@ class StructType
8484
enum RecordKind : uint32_t { Class, Union, Struct };
8585

8686
/// Create a identified and complete struct type.
87-
static StructType get(mlir::MLIRContext *context, llvm::ArrayRef<mlir::Type> members,
87+
static StructType get(mlir::MLIRContext *context,
88+
llvm::ArrayRef<mlir::Type> members,
8889
mlir::StringAttr name, bool packed, RecordKind kind,
8990
ASTRecordDeclInterface ast = {});
90-
static StructType getChecked(llvm::function_ref<mlir::InFlightDiagnostic()> emitError,
91-
mlir::MLIRContext *context, llvm::ArrayRef<mlir::Type> members,
92-
mlir::StringAttr name, bool packed, RecordKind kind,
93-
ASTRecordDeclInterface ast = {});
91+
static StructType
92+
getChecked(llvm::function_ref<mlir::InFlightDiagnostic()> emitError,
93+
mlir::MLIRContext *context, llvm::ArrayRef<mlir::Type> members,
94+
mlir::StringAttr name, bool packed, RecordKind kind,
95+
ASTRecordDeclInterface ast = {});
9496

9597
/// Create a identified and incomplete struct type.
96-
static StructType get(mlir::MLIRContext *context, mlir::StringAttr name, RecordKind kind);
97-
static StructType getChecked(llvm::function_ref<mlir::InFlightDiagnostic()> emitError,
98-
mlir::MLIRContext *context, mlir::StringAttr name,
99-
RecordKind kind);
98+
static StructType get(mlir::MLIRContext *context, mlir::StringAttr name,
99+
RecordKind kind);
100+
static StructType
101+
getChecked(llvm::function_ref<mlir::InFlightDiagnostic()> emitError,
102+
mlir::MLIRContext *context, mlir::StringAttr name,
103+
RecordKind kind);
100104

101105
/// Create a anonymous struct type (always complete).
102-
static StructType get(mlir::MLIRContext *context, llvm::ArrayRef<mlir::Type> members,
103-
bool packed, RecordKind kind,
104-
ASTRecordDeclInterface ast = {});
105-
static StructType getChecked(llvm::function_ref<mlir::InFlightDiagnostic()> emitError,
106-
mlir::MLIRContext *context, llvm::ArrayRef<mlir::Type> members,
107-
bool packed, RecordKind kind,
108-
ASTRecordDeclInterface ast = {});
106+
static StructType get(mlir::MLIRContext *context,
107+
llvm::ArrayRef<mlir::Type> members, bool packed,
108+
RecordKind kind, ASTRecordDeclInterface ast = {});
109+
static StructType
110+
getChecked(llvm::function_ref<mlir::InFlightDiagnostic()> emitError,
111+
mlir::MLIRContext *context, llvm::ArrayRef<mlir::Type> members,
112+
bool packed, RecordKind kind, ASTRecordDeclInterface ast = {});
109113

110114
/// Validate the struct about to be constructed.
111115
static llvm::LogicalResult
112116
verifyInvariants(llvm::function_ref<mlir::InFlightDiagnostic()> emitError,
113-
llvm::ArrayRef<mlir::Type> members, mlir::StringAttr name, bool incomplete,
114-
bool packed, StructType::RecordKind kind,
117+
llvm::ArrayRef<mlir::Type> members, mlir::StringAttr name,
118+
bool incomplete, bool packed, StructType::RecordKind kind,
115119
ASTRecordDeclInterface ast);
116120

117121
// Parse/print methods.
@@ -163,7 +167,8 @@ class StructType
163167
mlir::DataLayoutEntryListRef params) const;
164168
uint64_t getPreferredAlignment(const mlir::DataLayout &dataLayout,
165169
mlir::DataLayoutEntryListRef params) const;
166-
uint64_t getElementOffset(const mlir::DataLayout &dataLayout, unsigned idx) const;
170+
uint64_t getElementOffset(const mlir::DataLayout &dataLayout,
171+
unsigned idx) const;
167172

168173
bool isLayoutIdentical(const StructType &other);
169174

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

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ struct StructTypeStorage : public mlir::TypeStorage {
3535
StructType::RecordKind kind;
3636
ASTRecordDeclInterface ast;
3737

38-
KeyTy(llvm::ArrayRef<mlir::Type> members, mlir::StringAttr name, bool incomplete, bool packed,
39-
StructType::RecordKind kind, ASTRecordDeclInterface ast)
38+
KeyTy(llvm::ArrayRef<mlir::Type> members, mlir::StringAttr name,
39+
bool incomplete, bool packed, StructType::RecordKind kind,
40+
ASTRecordDeclInterface ast)
4041
: members(members), name(name), incomplete(incomplete), packed(packed),
4142
kind(kind), ast(ast) {}
4243
};
@@ -48,8 +49,8 @@ struct StructTypeStorage : public mlir::TypeStorage {
4849
StructType::RecordKind kind;
4950
ASTRecordDeclInterface ast;
5051

51-
StructTypeStorage(llvm::ArrayRef<mlir::Type> members, mlir::StringAttr name, bool incomplete,
52-
bool packed, StructType::RecordKind kind,
52+
StructTypeStorage(llvm::ArrayRef<mlir::Type> members, mlir::StringAttr name,
53+
bool incomplete, bool packed, StructType::RecordKind kind,
5354
ASTRecordDeclInterface ast)
5455
: members(members), name(name), incomplete(incomplete), packed(packed),
5556
kind(kind), ast(ast) {}
@@ -86,8 +87,9 @@ struct StructTypeStorage : public mlir::TypeStorage {
8687
/// mutations. Anonymous structs are always complete and cannot be mutated.
8788
/// This method does not fail if a mutation of a complete struct does not
8889
/// change the struct.
89-
llvm::LogicalResult mutate(mlir::TypeStorageAllocator &allocator, llvm::ArrayRef<mlir::Type> members,
90-
bool packed, ASTRecordDeclInterface ast) {
90+
llvm::LogicalResult mutate(mlir::TypeStorageAllocator &allocator,
91+
llvm::ArrayRef<mlir::Type> members, bool packed,
92+
ASTRecordDeclInterface ast) {
9193
// Anonymous structs cannot mutate.
9294
if (!name)
9395
return llvm::failure();

clang/include/clang/CIR/LoweringHelpers.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
#include "clang/CIR/Dialect/IR/CIRDialect.h"
1919

2020
mlir::DenseElementsAttr
21-
convertStringAttrToDenseElementsAttr(cir::ConstArrayAttr attr,
22-
mlir::Type type);
21+
convertStringAttrToDenseElementsAttr(cir::ConstArrayAttr attr, mlir::Type type);
2322

2423
template <typename StorageTy> StorageTy getZeroInitFromType(mlir::Type Ty);
2524
template <> mlir::APInt getZeroInitFromType(mlir::Type Ty);

clang/lib/CIR/CodeGen/Address.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,9 @@ class Address {
5050
assert(!alignment.isZero() && "Alignment cannot be zero");
5151
}
5252
Address(mlir::Value pointer, clang::CharUnits alignment)
53-
: Address(
54-
pointer,
55-
mlir::cast<cir::PointerType>(pointer.getType()).getPointee(),
56-
alignment) {
53+
: Address(pointer,
54+
mlir::cast<cir::PointerType>(pointer.getType()).getPointee(),
55+
alignment) {
5756

5857
assert((!alignment.isZero() || pointer == nullptr) &&
5958
"creating valid address with invalid alignment");

clang/lib/CIR/CodeGen/CIRGenAtomic.cpp

Lines changed: 28 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,8 @@ static bool isCstWeak(mlir::Value weakVal, bool &val) {
375375
static void buildDefaultCase(CIRGenBuilderTy &builder, mlir::Location loc) {
376376
auto EmptyArrayAttr = builder.getArrayAttr({});
377377
mlir::OpBuilder::InsertPoint insertPoint;
378-
builder.create<cir::CaseOp>(
379-
loc, EmptyArrayAttr, cir::CaseOpKind::Default, insertPoint);
378+
builder.create<cir::CaseOp>(loc, EmptyArrayAttr, cir::CaseOpKind::Default,
379+
insertPoint);
380380
builder.restoreInsertionPoint(insertPoint);
381381
}
382382

@@ -390,8 +390,8 @@ static void buildSingleMemOrderCase(CIRGenBuilderTy &builder,
390390
cir::IntAttr::get(Type, static_cast<int>(Order))};
391391
auto OneAttribute = builder.getArrayAttr(OneOrder);
392392
mlir::OpBuilder::InsertPoint insertPoint;
393-
builder.create<cir::CaseOp>(loc, OneAttribute,
394-
cir::CaseOpKind::Equal, insertPoint);
393+
builder.create<cir::CaseOp>(loc, OneAttribute, cir::CaseOpKind::Equal,
394+
insertPoint);
395395
builder.restoreInsertionPoint(insertPoint);
396396
}
397397

@@ -407,8 +407,8 @@ static void buildDoubleMemOrderCase(CIRGenBuilderTy &builder,
407407
cir::IntAttr::get(Type, static_cast<int>(Order2))};
408408
auto TwoAttributes = builder.getArrayAttr(TwoOrders);
409409
mlir::OpBuilder::InsertPoint insertPoint;
410-
builder.create<cir::CaseOp>(loc, TwoAttributes,
411-
cir::CaseOpKind::Anyof, insertPoint);
410+
builder.create<cir::CaseOp>(loc, TwoAttributes, cir::CaseOpKind::Anyof,
411+
insertPoint);
412412
builder.restoreInsertionPoint(insertPoint);
413413
}
414414

@@ -432,8 +432,7 @@ static void buildAtomicCmpXchg(CIRGenFunction &CGF, AtomicExpr *E, bool IsWeak,
432432
auto cmp = builder.createNot(cmpxchg.getCmp());
433433
builder.create<cir::IfOp>(
434434
loc, cmp, false, [&](mlir::OpBuilder &, mlir::Location) {
435-
auto ptrTy =
436-
mlir::cast<cir::PointerType>(Val1.getPointer().getType());
435+
auto ptrTy = mlir::cast<cir::PointerType>(Val1.getPointer().getType());
437436
if (Val1.getElementType() != ptrTy.getPointee()) {
438437
Val1 = Val1.withPointer(builder.createPtrBitcast(
439438
Val1.getPointer(), Val1.getElementType()));
@@ -515,8 +514,7 @@ static void buildAtomicCmpXchgFailureSet(
515514
// memory_order_consume is not implemented and always falls back to
516515
// memory_order_acquire
517516
buildDoubleMemOrderCase(builder, loc, FailureOrderVal.getType(),
518-
cir::MemOrder::Consume,
519-
cir::MemOrder::Acquire);
517+
cir::MemOrder::Consume, cir::MemOrder::Acquire);
520518
buildAtomicCmpXchg(CGF, E, IsWeak, Dest, Ptr, Val1, Val2, Size,
521519
SuccessOrder, cir::MemOrder::Acquire, Scope);
522520
builder.createBreak(loc);
@@ -531,8 +529,8 @@ static void buildAtomicCmpXchgFailureSet(
531529
buildSingleMemOrderCase(builder, loc, FailureOrderVal.getType(),
532530
cir::MemOrder::SequentiallyConsistent);
533531
buildAtomicCmpXchg(CGF, E, IsWeak, Dest, Ptr, Val1, Val2, Size,
534-
SuccessOrder,
535-
cir::MemOrder::SequentiallyConsistent, Scope);
532+
SuccessOrder, cir::MemOrder::SequentiallyConsistent,
533+
Scope);
536534
builder.createBreak(loc);
537535

538536
builder.setInsertionPointToEnd(switchBlock);
@@ -543,8 +541,7 @@ static void buildAtomicCmpXchgFailureSet(
543541
static void buildAtomicOp(CIRGenFunction &CGF, AtomicExpr *E, Address Dest,
544542
Address Ptr, Address Val1, Address Val2,
545543
mlir::Value IsWeak, mlir::Value FailureOrder,
546-
uint64_t Size, cir::MemOrder Order,
547-
uint8_t Scope) {
544+
uint64_t Size, cir::MemOrder Order, uint8_t Scope) {
548545
assert(!cir::MissingFeatures::syncScopeID());
549546
StringRef Op;
550547

@@ -599,8 +596,7 @@ static void buildAtomicOp(CIRGenFunction &CGF, AtomicExpr *E, Address Dest,
599596

600597
// TODO(cir): this logic should be part of createStore, but doing so
601598
// currently breaks CodeGen/union.cpp and CodeGen/union.cpp.
602-
auto ptrTy =
603-
mlir::cast<cir::PointerType>(Dest.getPointer().getType());
599+
auto ptrTy = mlir::cast<cir::PointerType>(Dest.getPointer().getType());
604600
if (Dest.getElementType() != ptrTy.getPointee()) {
605601
Dest = Dest.withPointer(
606602
builder.createPtrBitcast(Dest.getPointer(), Dest.getElementType()));
@@ -644,8 +640,8 @@ static void buildAtomicOp(CIRGenFunction &CGF, AtomicExpr *E, Address Dest,
644640
case AtomicExpr::AO__atomic_fetch_add:
645641
case AtomicExpr::AO__scoped_atomic_fetch_add:
646642
Op = cir::AtomicFetch::getOperationName();
647-
fetchAttr = cir::AtomicFetchKindAttr::get(
648-
builder.getContext(), cir::AtomicFetchKind::Add);
643+
fetchAttr = cir::AtomicFetchKindAttr::get(builder.getContext(),
644+
cir::AtomicFetchKind::Add);
649645
break;
650646

651647
case AtomicExpr::AO__atomic_sub_fetch:
@@ -658,8 +654,8 @@ static void buildAtomicOp(CIRGenFunction &CGF, AtomicExpr *E, Address Dest,
658654
case AtomicExpr::AO__atomic_fetch_sub:
659655
case AtomicExpr::AO__scoped_atomic_fetch_sub:
660656
Op = cir::AtomicFetch::getOperationName();
661-
fetchAttr = cir::AtomicFetchKindAttr::get(
662-
builder.getContext(), cir::AtomicFetchKind::Sub);
657+
fetchAttr = cir::AtomicFetchKindAttr::get(builder.getContext(),
658+
cir::AtomicFetchKind::Sub);
663659
break;
664660

665661
case AtomicExpr::AO__atomic_min_fetch:
@@ -672,8 +668,8 @@ static void buildAtomicOp(CIRGenFunction &CGF, AtomicExpr *E, Address Dest,
672668
case AtomicExpr::AO__atomic_fetch_min:
673669
case AtomicExpr::AO__scoped_atomic_fetch_min:
674670
Op = cir::AtomicFetch::getOperationName();
675-
fetchAttr = cir::AtomicFetchKindAttr::get(
676-
builder.getContext(), cir::AtomicFetchKind::Min);
671+
fetchAttr = cir::AtomicFetchKindAttr::get(builder.getContext(),
672+
cir::AtomicFetchKind::Min);
677673
break;
678674

679675
case AtomicExpr::AO__atomic_max_fetch:
@@ -686,8 +682,8 @@ static void buildAtomicOp(CIRGenFunction &CGF, AtomicExpr *E, Address Dest,
686682
case AtomicExpr::AO__atomic_fetch_max:
687683
case AtomicExpr::AO__scoped_atomic_fetch_max:
688684
Op = cir::AtomicFetch::getOperationName();
689-
fetchAttr = cir::AtomicFetchKindAttr::get(
690-
builder.getContext(), cir::AtomicFetchKind::Max);
685+
fetchAttr = cir::AtomicFetchKindAttr::get(builder.getContext(),
686+
cir::AtomicFetchKind::Max);
691687
break;
692688

693689
case AtomicExpr::AO__atomic_and_fetch:
@@ -700,8 +696,8 @@ static void buildAtomicOp(CIRGenFunction &CGF, AtomicExpr *E, Address Dest,
700696
case AtomicExpr::AO__atomic_fetch_and:
701697
case AtomicExpr::AO__scoped_atomic_fetch_and:
702698
Op = cir::AtomicFetch::getOperationName();
703-
fetchAttr = cir::AtomicFetchKindAttr::get(
704-
builder.getContext(), cir::AtomicFetchKind::And);
699+
fetchAttr = cir::AtomicFetchKindAttr::get(builder.getContext(),
700+
cir::AtomicFetchKind::And);
705701
break;
706702

707703
case AtomicExpr::AO__atomic_or_fetch:
@@ -714,8 +710,8 @@ static void buildAtomicOp(CIRGenFunction &CGF, AtomicExpr *E, Address Dest,
714710
case AtomicExpr::AO__atomic_fetch_or:
715711
case AtomicExpr::AO__scoped_atomic_fetch_or:
716712
Op = cir::AtomicFetch::getOperationName();
717-
fetchAttr = cir::AtomicFetchKindAttr::get(
718-
builder.getContext(), cir::AtomicFetchKind::Or);
713+
fetchAttr = cir::AtomicFetchKindAttr::get(builder.getContext(),
714+
cir::AtomicFetchKind::Or);
719715
break;
720716

721717
case AtomicExpr::AO__atomic_xor_fetch:
@@ -728,8 +724,8 @@ static void buildAtomicOp(CIRGenFunction &CGF, AtomicExpr *E, Address Dest,
728724
case AtomicExpr::AO__atomic_fetch_xor:
729725
case AtomicExpr::AO__scoped_atomic_fetch_xor:
730726
Op = cir::AtomicFetch::getOperationName();
731-
fetchAttr = cir::AtomicFetchKindAttr::get(
732-
builder.getContext(), cir::AtomicFetchKind::Xor);
727+
fetchAttr = cir::AtomicFetchKindAttr::get(builder.getContext(),
728+
cir::AtomicFetchKind::Xor);
733729
break;
734730

735731
case AtomicExpr::AO__atomic_nand_fetch:
@@ -740,8 +736,8 @@ static void buildAtomicOp(CIRGenFunction &CGF, AtomicExpr *E, Address Dest,
740736
case AtomicExpr::AO__atomic_fetch_nand:
741737
case AtomicExpr::AO__scoped_atomic_fetch_nand:
742738
Op = cir::AtomicFetch::getOperationName();
743-
fetchAttr = cir::AtomicFetchKindAttr::get(
744-
builder.getContext(), cir::AtomicFetchKind::Nand);
739+
fetchAttr = cir::AtomicFetchKindAttr::get(builder.getContext(),
740+
cir::AtomicFetchKind::Nand);
745741
break;
746742
}
747743

clang/lib/CIR/CodeGen/CIRGenBuilder.cpp

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,16 @@ using namespace clang::CIRGen;
1212
mlir::Value CIRGenBuilderTy::maybeBuildArrayDecay(mlir::Location loc,
1313
mlir::Value arrayPtr,
1414
mlir::Type eltTy) {
15-
auto arrayPtrTy =
16-
::mlir::dyn_cast<cir::PointerType>(arrayPtr.getType());
15+
auto arrayPtrTy = ::mlir::dyn_cast<cir::PointerType>(arrayPtr.getType());
1716
assert(arrayPtrTy && "expected pointer type");
18-
auto arrayTy =
19-
::mlir::dyn_cast<cir::ArrayType>(arrayPtrTy.getPointee());
17+
auto arrayTy = ::mlir::dyn_cast<cir::ArrayType>(arrayPtrTy.getPointee());
2018

2119
if (arrayTy) {
2220
auto addrSpace = ::mlir::cast_if_present<cir::AddressSpaceAttr>(
2321
arrayPtrTy.getAddrSpace());
24-
cir::PointerType flatPtrTy =
25-
getPointerTo(arrayTy.getEltType(), addrSpace);
26-
return create<cir::CastOp>(
27-
loc, flatPtrTy, cir::CastKind::array_to_ptrdecay, arrayPtr);
22+
cir::PointerType flatPtrTy = getPointerTo(arrayTy.getEltType(), addrSpace);
23+
return create<cir::CastOp>(loc, flatPtrTy, cir::CastKind::array_to_ptrdecay,
24+
arrayPtr);
2825
}
2926

3027
assert(arrayPtrTy.getPointee() == eltTy &&
@@ -45,7 +42,7 @@ mlir::Value CIRGenBuilderTy::getArrayElement(mlir::Location arrayLocBegin,
4542
}
4643

4744
cir::ConstantOp CIRGenBuilderTy::getConstInt(mlir::Location loc,
48-
llvm::APSInt intVal) {
45+
llvm::APSInt intVal) {
4946
bool isSigned = intVal.isSigned();
5047
auto width = intVal.getBitWidth();
5148
cir::IntType t = isSigned ? getSIntNTy(width) : getUIntNTy(width);
@@ -54,16 +51,15 @@ cir::ConstantOp CIRGenBuilderTy::getConstInt(mlir::Location loc,
5451
}
5552

5653
cir::ConstantOp CIRGenBuilderTy::getConstInt(mlir::Location loc,
57-
llvm::APInt intVal) {
54+
llvm::APInt intVal) {
5855
auto width = intVal.getBitWidth();
5956
cir::IntType t = getUIntNTy(width);
6057
return getConstInt(loc, t, intVal.getZExtValue());
6158
}
6259

63-
cir::ConstantOp CIRGenBuilderTy::getConstInt(mlir::Location loc,
64-
mlir::Type t, uint64_t C) {
60+
cir::ConstantOp CIRGenBuilderTy::getConstInt(mlir::Location loc, mlir::Type t,
61+
uint64_t C) {
6562
auto intTy = mlir::dyn_cast<cir::IntType>(t);
6663
assert(intTy && "expected cir::IntType");
67-
return create<cir::ConstantOp>(loc, intTy,
68-
cir::IntAttr::get(t, C));
64+
return create<cir::ConstantOp>(loc, intTy, cir::IntAttr::get(t, C));
6965
}

0 commit comments

Comments
 (0)