[Mlir-commits] [mlir] [mlir][py] Overload print with state. (PR #72064)
Maksim Levental
llvmlistbot at llvm.org
Sun Nov 12 11:56:12 PST 2023
================
@@ -550,16 +550,19 @@ class PyModule : public BaseContextObject {
pybind11::handle handle;
};
+class PyAsmState;
+
/// Base class for PyOperation and PyOpView which exposes the primary, user
/// visible methods for manipulating it.
class PyOperationBase {
public:
virtual ~PyOperationBase() = default;
/// Implements the bound 'print' method and helps with others.
- void print(pybind11::object fileObject, bool binary,
- std::optional<int64_t> largeElementsLimit, bool enableDebugInfo,
+ void print(std::optional<int64_t> largeElementsLimit, bool enableDebugInfo,
bool prettyDebugInfo, bool printGenericOpForm, bool useLocalScope,
- bool assumeVerified);
+ bool assumeVerified, pybind11::object fileObject, bool binary);
+ void print(PyAsmState &state, pybind11::object fileObject, bool binary);
----------------
makslevental wrote:
```suggestion
bool assumeVerified, py::object fileObject, bool binary);
void print(PyAsmState &state, py::object fileObject, bool binary);
```
https://github.com/llvm/llvm-project/pull/72064
More information about the Mlir-commits
mailing list