[Mlir-commits] [mlir] d44f8a5 - [MLIR] [Python] Fix the Windows build broken by d747a17
John Demme
llvmlistbot at llvm.org
Tue Aug 9 20:13:56 PDT 2022
Author: John Demme
Date: 2022-08-09T20:07:33-07:00
New Revision: d44f8a50d50909e67f28f91511045404261dbcbf
URL: https://github.com/llvm/llvm-project/commit/d44f8a50d50909e67f28f91511045404261dbcbf
DIFF: https://github.com/llvm/llvm-project/commit/d44f8a50d50909e67f28f91511045404261dbcbf.diff
LOG: [MLIR] [Python] Fix the Windows build broken by d747a17
Windows builds require all control paths return. Since we don't have
`llvm_unreachable` in the Python bindings, just return `None`.
Added:
Modified:
mlir/lib/Bindings/Python/IRCore.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Bindings/Python/IRCore.cpp b/mlir/lib/Bindings/Python/IRCore.cpp
index db199b38b915..033edbdfd87e 100644
--- a/mlir/lib/Bindings/Python/IRCore.cpp
+++ b/mlir/lib/Bindings/Python/IRCore.cpp
@@ -3117,7 +3117,7 @@ void mlir::python::populateIRCore(py::module &m) {
kDumpDocstring)
.def_property_readonly(
"owner",
- [](PyValue &self) {
+ [](PyValue &self) -> py::object {
MlirValue v = self.get();
if (mlirValueIsAOpResult(v)) {
assert(
@@ -3134,6 +3134,7 @@ void mlir::python::populateIRCore(py::module &m) {
}
assert(false && "Value must be a block argument or an op result");
+ return py::none();
})
.def("__eq__",
[](PyValue &self, PyValue &other) {
More information about the Mlir-commits
mailing list