aboutsummaryrefslogtreecommitdiff
path: root/mlir/lib/Bindings/Python/IRModule.h
diff options
context:
space:
mode:
authorJacques Pienaar <jpienaar@google.com>2023-04-30 22:11:02 -0700
committerJacques Pienaar <jpienaar@google.com>2023-04-30 22:11:02 -0700
commit5c90e1ffb009478a644f9bd6439f37f96b09e399 (patch)
tree27872e22f0b0cc33aa1834335aa82e59066a2747 /mlir/lib/Bindings/Python/IRModule.h
parentfddd28364c69bc07b6552b7344207abf4feb2e8b (diff)
downloadllvm-5c90e1ffb009478a644f9bd6439f37f96b09e399.zip
llvm-5c90e1ffb009478a644f9bd6439f37f96b09e399.tar.gz
llvm-5c90e1ffb009478a644f9bd6439f37f96b09e399.tar.bz2
[mlir][bytecode] Return error instead of min version
Can't return a well-formed IR output while enabling version to be bumped up during emission. Previously it would return min version but potentially invalid IR which was confusing, instead make it return error and abort immediately instead. Differential Revision: https://reviews.llvm.org/D149569
Diffstat (limited to 'mlir/lib/Bindings/Python/IRModule.h')
-rw-r--r--mlir/lib/Bindings/Python/IRModule.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/mlir/lib/Bindings/Python/IRModule.h b/mlir/lib/Bindings/Python/IRModule.h
index 56bb834..ade790b 100644
--- a/mlir/lib/Bindings/Python/IRModule.h
+++ b/mlir/lib/Bindings/Python/IRModule.h
@@ -554,9 +554,8 @@ public:
bool assumeVerified);
// Implement the bound 'writeBytecode' method.
- MlirBytecodeWriterResult
- writeBytecode(const pybind11::object &fileObject,
- std::optional<int64_t> bytecodeVersion);
+ void writeBytecode(const pybind11::object &fileObject,
+ std::optional<int64_t> bytecodeVersion);
/// Moves the operation before or after the other operation.
void moveAfter(PyOperationBase &other);