diff --git a/mlir/include/mlir/IR/OpDefinition.h b/mlir/include/mlir/IR/OpDefinition.h --- a/mlir/include/mlir/IR/OpDefinition.h +++ b/mlir/include/mlir/IR/OpDefinition.h @@ -44,9 +44,11 @@ OptionalParseResult(llvm::NoneType) : impl(llvm::None) {} /// Returns true if we contain a valid ParseResult value. + bool has_value() const { return impl.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(); } ParseResult operator*() const { return getValue(); }