@@ -147,6 +147,26 @@ class PyAffineMapAttribute : public PyConcreteAttribute<PyAffineMapAttribute> {
147147 }
148148};
149149
150+ class PyIntegerSetAttribute
151+ : public PyConcreteAttribute<PyIntegerSetAttribute> {
152+ public:
153+ static constexpr IsAFunctionTy isaFunction = mlirAttributeIsAIntegerSet;
154+ static constexpr const char *pyClassName = " IntegerSetAttr" ;
155+ using PyConcreteAttribute::PyConcreteAttribute;
156+ static constexpr GetTypeIDFunctionTy getTypeIdFunction =
157+ mlirIntegerSetAttrGetTypeID;
158+
159+ static void bindDerived (ClassTy &c) {
160+ c.def_static (
161+ " get" ,
162+ [](PyIntegerSet &integerSet) {
163+ MlirAttribute attr = mlirIntegerSetAttrGet (integerSet.get ());
164+ return PyIntegerSetAttribute (integerSet.getContext (), attr);
165+ },
166+ py::arg (" integer_set" ), " Gets an attribute wrapping an IntegerSet." );
167+ }
168+ };
169+
150170template <typename T>
151171static T pyTryCast (py::handle object) {
152172 try {
@@ -1426,7 +1446,6 @@ py::object symbolRefOrFlatSymbolRefAttributeCaster(PyAttribute &pyAttribute) {
14261446
14271447void mlir::python::populateIRAttributes (py::module &m) {
14281448 PyAffineMapAttribute::bind (m);
1429-
14301449 PyDenseBoolArrayAttribute::bind (m);
14311450 PyDenseBoolArrayAttribute::PyDenseArrayIterator::bind (m);
14321451 PyDenseI8ArrayAttribute::bind (m);
@@ -1466,6 +1485,7 @@ void mlir::python::populateIRAttributes(py::module &m) {
14661485 PyOpaqueAttribute::bind (m);
14671486 PyFloatAttribute::bind (m);
14681487 PyIntegerAttribute::bind (m);
1488+ PyIntegerSetAttribute::bind (m);
14691489 PyStringAttribute::bind (m);
14701490 PyTypeAttribute::bind (m);
14711491 PyGlobals::get ().registerTypeCaster (
0 commit comments