forked from OSchip/llvm-project
[mlir] Deprecate OptionalParseResult::{hasValue,getValue}
This patch deprecates hasValue and getValue for consistency with std::optional and llvm::Optional. Note that I've migrated all known uses of them to has_value and value, respectively. Differential Revision: https://reviews.llvm.org/D131366
This commit is contained in:
parent
7082e1506d
commit
5c4674d67b
|
@ -45,11 +45,15 @@ public:
|
|||
|
||||
/// Returns true if we contain a valid ParseResult value.
|
||||
bool has_value() const { return impl.has_value(); }
|
||||
bool hasValue() const { return impl.has_value(); }
|
||||
LLVM_DEPRECATED("Use has_value instead", "has_value") bool hasValue() const {
|
||||
return impl.has_value();
|
||||
}
|
||||
|
||||
/// Access the internal ParseResult value.
|
||||
ParseResult value() const { return impl.value(); }
|
||||
ParseResult getValue() const { return impl.value(); }
|
||||
LLVM_DEPRECATED("Use value instead", "value") ParseResult getValue() const {
|
||||
return impl.value();
|
||||
}
|
||||
ParseResult operator*() const { return value(); }
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in New Issue