@@ -546,27 +546,23 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy {
546546 //
547547 cir::ConstantOp getUInt8 (uint8_t c, mlir::Location loc) {
548548 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));
550550 }
551551 cir::ConstantOp getSInt32 (int32_t c, mlir::Location loc) {
552552 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));
555554 }
556555 cir::ConstantOp getUInt32 (uint32_t C, mlir::Location loc) {
557556 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));
560558 }
561559 cir::ConstantOp getSInt64 (uint64_t C, mlir::Location loc) {
562560 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));
565562 }
566563 cir::ConstantOp getUInt64 (uint64_t C, mlir::Location loc) {
567564 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));
570566 }
571567
572568 cir::ConstantOp getConstInt (mlir::Location loc, llvm::APSInt intVal);
@@ -579,7 +575,7 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy {
579575 llvm::APFloat fpVal) {
580576 assert ((mlir::isa<cir::SingleType, cir::DoubleType>(t)) &&
581577 " 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));
583579 }
584580
585581 cir::IsFPClassOp createIsFPClass (mlir::Location loc, mlir::Value src,
@@ -590,19 +586,19 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy {
590586 // / Create constant nullptr for pointer-to-data-member type ty.
591587 cir::ConstantOp getNullDataMemberPtr (cir::DataMemberType ty,
592588 mlir::Location loc) {
593- return create<cir::ConstantOp>(loc, ty, getNullDataMemberAttr (ty));
589+ return create<cir::ConstantOp>(loc, getNullDataMemberAttr (ty));
594590 }
595591
596592 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));
598594 }
599595
600596 cir::ConstantOp getZero (mlir::Location loc, mlir::Type ty) {
601597 // TODO: dispatch creation for primitive types.
602598 assert ((mlir::isa<cir::RecordType>(ty) || mlir::isa<cir::ArrayType>(ty) ||
603599 mlir::isa<cir::VectorType>(ty)) &&
604600 " 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));
606602 }
607603
608604 //
0 commit comments