[mlir] Add has_value and value to OptionalParseResult
authorKazu Hirata <kazu@google.com>
Wed, 3 Aug 2022 05:16:55 +0000 (22:16 -0700)
committerKazu Hirata <kazu@google.com>
Wed, 3 Aug 2022 05:16:55 +0000 (22:16 -0700)
commitdc860d55eb8297083ca928341b2c222d648fba2a
tree0b07488189062dbcd20e78044aed68c010cc59d4
parentd469f136bee04ed80e70df981934fa1144a9d2cc
[mlir] Add has_value and value to OptionalParseResult

llvm::Optional is in the process of switching to the
std::optional-like interface with has_value/value as opposed to
hasValue/getValue.

This patch adds has_value and value to enable the same transition.

Differential Revision: https://reviews.llvm.org/D130819
mlir/include/mlir/IR/OpDefinition.h