[Mlir-commits] [mlir] 7f37a77 - [MLIR] Hide FailureOr::hasValue()
Christian Sigg
llvmlistbot at llvm.org
Mon Nov 21 09:35:38 PST 2022
Author: Christian Sigg
Date: 2022-11-21T18:35:32+01:00
New Revision: 7f37a779e9f8e2961175c2169f52dee5d48cc88d
URL: https://github.com/llvm/llvm-project/commit/7f37a779e9f8e2961175c2169f52dee5d48cc88d
DIFF: https://github.com/llvm/llvm-project/commit/7f37a779e9f8e2961175c2169f52dee5d48cc88d.diff
LOG: [MLIR] Hide FailureOr::hasValue()
`Optional<T>::hasValue()` is deprecated and should be private like `has_value()`.
Reviewed By: tpopp, bondhugula
Differential Revision: https://reviews.llvm.org/D138400
Added:
Modified:
mlir/include/mlir/Support/LogicalResult.h
Removed:
################################################################################
diff --git a/mlir/include/mlir/Support/LogicalResult.h b/mlir/include/mlir/Support/LogicalResult.h
index e3163fe431e52..ddd338946c867 100644
--- a/mlir/include/mlir/Support/LogicalResult.h
+++ b/mlir/include/mlir/Support/LogicalResult.h
@@ -96,6 +96,7 @@ class [[nodiscard]] FailureOr : public Optional<T> {
private:
/// Hide the bool conversion as it easily creates confusion.
using Optional<T>::operator bool;
+ using Optional<T>::hasValue;
using Optional<T>::has_value;
};
More information about the Mlir-commits
mailing list