[Mlir-commits] [mlir] 2233c4d - [mlir] Add operator!= to WalkResult, for completeness.

Benjamin Kramer llvmlistbot at llvm.org
Mon Dec 19 14:42:45 PST 2022


Author: Benjamin Kramer
Date: 2022-12-19T23:39:13+01:00
New Revision: 2233c4dc706f351286a18bf39f6044ebcb4dbb48

URL: https://github.com/llvm/llvm-project/commit/2233c4dc706f351286a18bf39f6044ebcb4dbb48
DIFF: https://github.com/llvm/llvm-project/commit/2233c4dc706f351286a18bf39f6044ebcb4dbb48.diff

LOG: [mlir] Add operator!= to WalkResult, for completeness.

Added: 
    

Modified: 
    mlir/include/mlir/IR/Visitors.h
    mlir/lib/Bindings/Python/IRAffine.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/IR/Visitors.h b/mlir/include/mlir/IR/Visitors.h
index 756b05de6ac4c..b170c2655f708 100644
--- a/mlir/include/mlir/IR/Visitors.h
+++ b/mlir/include/mlir/IR/Visitors.h
@@ -46,6 +46,7 @@ class WalkResult {
   WalkResult(InFlightDiagnostic &&) : result(Interrupt) {}
 
   bool operator==(const WalkResult &rhs) const { return result == rhs.result; }
+  bool operator!=(const WalkResult &rhs) const { return result != rhs.result; }
 
   static WalkResult interrupt() { return {Interrupt}; }
   static WalkResult advance() { return {Advance}; }

diff  --git a/mlir/lib/Bindings/Python/IRAffine.cpp b/mlir/lib/Bindings/Python/IRAffine.cpp
index fc7133b437aa2..09f36b07cd793 100644
--- a/mlir/lib/Bindings/Python/IRAffine.cpp
+++ b/mlir/lib/Bindings/Python/IRAffine.cpp
@@ -15,6 +15,7 @@
 #include "mlir-c/AffineMap.h"
 #include "mlir-c/Bindings/Python/Interop.h"
 #include "mlir-c/IntegerSet.h"
+#include "llvm/ADT/Hashing.h"
 
 namespace py = pybind11;
 using namespace mlir;


        


More information about the Mlir-commits mailing list