[Mlir-commits] [mlir] 10de551 - [mlir][python] Address deprecation	warning for hasValue
    Jacques Pienaar 
    llvmlistbot at llvm.org
       
    Sun Aug  7 15:28:24 PDT 2022
    
    
  
Author: Jacques Pienaar
Date: 2022-08-07T15:28:18-07:00
New Revision: 10de5512971014cb98d41feefcf4206ca442c743
URL: https://github.com/llvm/llvm-project/commit/10de5512971014cb98d41feefcf4206ca442c743
DIFF: https://github.com/llvm/llvm-project/commit/10de5512971014cb98d41feefcf4206ca442c743.diff
LOG: [mlir][python] Address deprecation warning for hasValue
Added: 
    
Modified: 
    mlir/lib/Bindings/Python/IRModule.h
Removed: 
    
################################################################################
diff  --git a/mlir/lib/Bindings/Python/IRModule.h b/mlir/lib/Bindings/Python/IRModule.h
index 2e2ebaa27cac3..246b244e1476c 100644
--- a/mlir/lib/Bindings/Python/IRModule.h
+++ b/mlir/lib/Bindings/Python/IRModule.h
@@ -330,7 +330,7 @@ class PyDiagnosticHandler {
   PyDiagnosticHandler(MlirContext context, pybind11::object callback);
   ~PyDiagnosticHandler();
 
-  bool isAttached() { return registeredID.hasValue(); }
+  bool isAttached() { return registeredID.has_value(); }
   bool getHadError() { return hadError; }
 
   /// Detaches the handler. Does nothing if not attached.
        
    
    
More information about the Mlir-commits
mailing list