@@ -133,25 +133,21 @@ class CIRBaseBuilderTy : public mlir::OpBuilder {
133133
134134 cir::BoolAttr getFalseAttr () { return getCIRBoolAttr (false ); }
135135
136- mlir::TypedAttr getZeroAttr (mlir::Type t) {
137- return cir::ZeroAttr::get (getContext (), t);
138- }
139-
140136 mlir::TypedAttr getZeroInitAttr (mlir::Type ty) {
141137 if (mlir::isa<cir::IntType>(ty))
142138 return cir::IntAttr::get (ty, 0 );
143139 if (cir::isAnyFloatingPointType (ty))
144140 return cir::FPAttr::getZero (ty);
145141 if (auto complexType = mlir::dyn_cast<cir::ComplexType>(ty))
146- return getZeroAttr (complexType);
142+ return cir::ZeroAttr::get (complexType);
147143 if (auto arrTy = mlir::dyn_cast<cir::ArrayType>(ty))
148- return getZeroAttr (arrTy);
144+ return cir::ZeroAttr::get (arrTy);
149145 if (auto vecTy = mlir::dyn_cast<cir::VectorType>(ty))
150- return getZeroAttr (vecTy);
146+ return cir::ZeroAttr::get (vecTy);
151147 if (auto ptrTy = mlir::dyn_cast<cir::PointerType>(ty))
152148 return getConstNullPtrAttr (ptrTy);
153149 if (auto RecordTy = mlir::dyn_cast<cir::RecordType>(ty))
154- return getZeroAttr (RecordTy);
150+ return cir::ZeroAttr::get (RecordTy);
155151 if (auto methodTy = mlir::dyn_cast<cir::MethodType>(ty))
156152 return getNullMethodAttr (methodTy);
157153 if (mlir::isa<cir::BoolType>(ty)) {
0 commit comments