@@ -546,27 +546,23 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy {
546
546
//
547
547
cir::ConstantOp getUInt8 (uint8_t c, mlir::Location loc) {
548
548
auto uInt8Ty = getUInt8Ty ();
549
- return create<cir::ConstantOp>(loc, uInt8Ty, cir::IntAttr::get (uInt8Ty, c));
549
+ return create<cir::ConstantOp>(loc, cir::IntAttr::get (uInt8Ty, c));
550
550
}
551
551
cir::ConstantOp getSInt32 (int32_t c, mlir::Location loc) {
552
552
auto sInt32Ty = getSInt32Ty ();
553
- return create<cir::ConstantOp>(loc, sInt32Ty ,
554
- cir::IntAttr::get (sInt32Ty , c));
553
+ return create<cir::ConstantOp>(loc, cir::IntAttr::get (sInt32Ty , c));
555
554
}
556
555
cir::ConstantOp getUInt32 (uint32_t C, mlir::Location loc) {
557
556
auto uInt32Ty = getUInt32Ty ();
558
- return create<cir::ConstantOp>(loc, uInt32Ty,
559
- cir::IntAttr::get (uInt32Ty, C));
557
+ return create<cir::ConstantOp>(loc, cir::IntAttr::get (uInt32Ty, C));
560
558
}
561
559
cir::ConstantOp getSInt64 (uint64_t C, mlir::Location loc) {
562
560
auto sInt64Ty = getSInt64Ty ();
563
- return create<cir::ConstantOp>(loc, sInt64Ty ,
564
- cir::IntAttr::get (sInt64Ty , C));
561
+ return create<cir::ConstantOp>(loc, cir::IntAttr::get (sInt64Ty , C));
565
562
}
566
563
cir::ConstantOp getUInt64 (uint64_t C, mlir::Location loc) {
567
564
auto uInt64Ty = getUInt64Ty ();
568
- return create<cir::ConstantOp>(loc, uInt64Ty,
569
- cir::IntAttr::get (uInt64Ty, C));
565
+ return create<cir::ConstantOp>(loc, cir::IntAttr::get (uInt64Ty, C));
570
566
}
571
567
572
568
cir::ConstantOp getConstInt (mlir::Location loc, llvm::APSInt intVal);
@@ -579,7 +575,7 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy {
579
575
llvm::APFloat fpVal) {
580
576
assert ((mlir::isa<cir::SingleType, cir::DoubleType>(t)) &&
581
577
" expected cir::SingleType or cir::DoubleType" );
582
- return create<cir::ConstantOp>(loc, t, getAttr<cir::FPAttr>(t, fpVal));
578
+ return create<cir::ConstantOp>(loc, getAttr<cir::FPAttr>(t, fpVal));
583
579
}
584
580
585
581
cir::IsFPClassOp createIsFPClass (mlir::Location loc, mlir::Value src,
@@ -590,19 +586,19 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy {
590
586
// / Create constant nullptr for pointer-to-data-member type ty.
591
587
cir::ConstantOp getNullDataMemberPtr (cir::DataMemberType ty,
592
588
mlir::Location loc) {
593
- return create<cir::ConstantOp>(loc, ty, getNullDataMemberAttr (ty));
589
+ return create<cir::ConstantOp>(loc, getNullDataMemberAttr (ty));
594
590
}
595
591
596
592
cir::ConstantOp getNullMethodPtr (cir::MethodType ty, mlir::Location loc) {
597
- return create<cir::ConstantOp>(loc, ty, getNullMethodAttr (ty));
593
+ return create<cir::ConstantOp>(loc, getNullMethodAttr (ty));
598
594
}
599
595
600
596
cir::ConstantOp getZero (mlir::Location loc, mlir::Type ty) {
601
597
// TODO: dispatch creation for primitive types.
602
598
assert ((mlir::isa<cir::RecordType>(ty) || mlir::isa<cir::ArrayType>(ty) ||
603
599
mlir::isa<cir::VectorType>(ty)) &&
604
600
" NYI for other types" );
605
- return create<cir::ConstantOp>(loc, ty, cir::ZeroAttr::get (ty));
601
+ return create<cir::ConstantOp>(loc, cir::ZeroAttr::get (ty));
606
602
}
607
603
608
604
//
0 commit comments