[Mlir-commits] [mlir] [mlir][python] generate value builders (PR #68308)

Maksim Levental llvmlistbot at llvm.org
Mon Oct 9 13:38:41 PDT 2023


================
@@ -260,11 +261,16 @@ constexpr const char *attributeDeleterTemplate = R"Py(
     del self.operation.attributes["{1}"]
 )Py";
 
-constexpr const char *regionAccessorTemplate = R"PY(
+constexpr const char *regionAccessorTemplate = R"Py(
   @builtins.property
   def {0}(self):
     return self.regions[{1}]
-)PY";
+)Py";
+
+constexpr const char *valueBuilderTemplate = R"Py(
+def {0}({2}) -> {4}:
----------------
makslevental wrote:

Discussed offline (type hints evidently supported since various `_ext.py`s employ them)

https://github.com/llvm/llvm-project/pull/68308


More information about the Mlir-commits mailing list