@@ -19,8 +19,8 @@ mlir::Value CIRGenBuilderTy::maybeBuildArrayDecay(mlir::Location loc,
1919 if (arrayTy) {
2020 cir::PointerType flatPtrTy =
2121 getPointerTo (arrayTy.getElementType (), arrayPtrTy.getAddrSpace ());
22- return create< cir::CastOp>(loc, flatPtrTy, cir::CastKind::array_to_ptrdecay ,
23- arrayPtr);
22+ return cir::CastOp::create (* this , loc, flatPtrTy ,
23+ cir::CastKind::array_to_ptrdecay, arrayPtr);
2424 }
2525
2626 assert (arrayPtrTy.getPointee () == eltTy &&
@@ -37,15 +37,15 @@ mlir::Value CIRGenBuilderTy::promoteArrayIndex(const clang::TargetInfo &ti,
3737
3838 // If this is a boolean, zero-extend it to the array index type.
3939 if (auto boolTy = mlir::dyn_cast<cir::BoolType>(index.getType ()))
40- return create< cir::CastOp>(loc, arrayIndexType, cir::CastKind::bool_to_int ,
41- index);
40+ return cir::CastOp::create (* this , loc, arrayIndexType ,
41+ cir::CastKind::bool_to_int, index);
4242
4343 // If this an integer, ensure that it is at least as width as the array index
4444 // type.
4545 if (auto intTy = mlir::dyn_cast<cir::IntType>(index.getType ())) {
4646 if (intTy.getWidth () < arrayIndexWidth)
47- return create< cir::CastOp>(loc, arrayIndexType, cir::CastKind::integral ,
48- index);
47+ return cir::CastOp::create (* this , loc, arrayIndexType ,
48+ cir::CastKind::integral, index);
4949 }
5050
5151 return index;
@@ -65,7 +65,7 @@ mlir::Value CIRGenBuilderTy::getArrayElement(const clang::TargetInfo &ti,
6565 if (shouldDecay && arrayTy && arrayTy == eltTy) {
6666 auto eltPtrTy =
6767 getPointerTo (arrayTy.getElementType (), arrayPtrTy.getAddrSpace ());
68- return create< cir::GetElementOp>( arrayLocEnd, eltPtrTy, arrayPtr,
68+ return cir::GetElementOp::create (* this , arrayLocEnd, eltPtrTy, arrayPtr,
6969 promoteArrayIndex (ti, arrayLocBegin, idx));
7070 }
7171
@@ -74,7 +74,7 @@ mlir::Value CIRGenBuilderTy::getArrayElement(const clang::TargetInfo &ti,
7474 if (shouldDecay)
7575 basePtr = maybeBuildArrayDecay (arrayLocBegin, arrayPtr, eltTy);
7676 mlir::Type flatPtrTy = basePtr.getType ();
77- return create< cir::PtrStrideOp>( arrayLocEnd, flatPtrTy, basePtr, idx);
77+ return cir::PtrStrideOp::create (* this , arrayLocEnd, flatPtrTy, basePtr, idx);
7878}
7979
8080cir::ConstantOp CIRGenBuilderTy::getConstInt (mlir::Location loc,
@@ -96,7 +96,7 @@ cir::ConstantOp CIRGenBuilderTy::getConstInt(mlir::Location loc,
9696cir::ConstantOp CIRGenBuilderTy::getConstInt (mlir::Location loc, mlir::Type t,
9797 uint64_t c) {
9898 assert (mlir::isa<cir::IntType>(t) && " expected cir::IntType" );
99- return create< cir::ConstantOp>( loc, cir::IntAttr::get (t, c));
99+ return cir::ConstantOp::create (* this , loc, cir::IntAttr::get (t, c));
100100}
101101
102102void CIRGenBuilderTy::computeGlobalViewIndicesFromFlatOffset (
0 commit comments