[Mlir-commits] [mlir] [MLIR][Python] Impl XOpInterface(s) from Python, with X=Transform and X=MemoryEffects (PR #176920)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Feb 11 21:47:46 PST 2026


================
@@ -1872,13 +1873,20 @@ class MLIR_PYTHON_API_EXPORTED NoTerminator : public PyDynamicOpTrait {
 MLIR_PYTHON_API_EXPORTED MlirValue getUniqueResult(MlirOperation operation);
 MLIR_PYTHON_API_EXPORTED void populateIRCore(nanobind::module_ &m);
 MLIR_PYTHON_API_EXPORTED void populateRoot(nanobind::module_ &m);
+
+/// Helper for creating an @classmethod.
+template <class Func, typename... Args>
+static nanobind::object classmethod(Func f, Args... args) {
----------------
PragmaTwice wrote:

```suggestion
nanobind::object classmethod(Func f, Args... args) {
```

I think it should not have internal linkage? previously it has `static` because it's defined in source files instead of headers.

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


More information about the Mlir-commits mailing list