MLIR
20.0.0git
|
This class implements Optional
functionality for ParseResult.
More...
#include "mlir/IR/OpDefinition.h"
Public Member Functions | |
OptionalParseResult ()=default | |
OptionalParseResult (LogicalResult result) | |
OptionalParseResult (ParseResult result) | |
OptionalParseResult (const InFlightDiagnostic &) | |
OptionalParseResult (std::nullopt_t) | |
bool | has_value () const |
Returns true if we contain a valid ParseResult value. More... | |
ParseResult | value () const |
Access the internal ParseResult value. More... | |
ParseResult | operator* () const |
This class implements Optional
functionality for ParseResult.
We don't directly use Optional here, because it provides an implicit conversion to 'bool' which we want to avoid. This class is used to implement tri-state 'parseOptional' functions that may have a failure mode when parsing that shouldn't be attributed to "not present".
Definition at line 39 of file OpDefinition.h.
|
default |
|
inline |
Definition at line 42 of file OpDefinition.h.
|
inline |
Definition at line 43 of file OpDefinition.h.
|
inline |
Definition at line 44 of file OpDefinition.h.
|
inline |
Definition at line 46 of file OpDefinition.h.
|
inline |
Returns true if we contain a valid ParseResult value.
Definition at line 49 of file OpDefinition.h.
Referenced by didntSucceed(), mlir::FieldParser< std::optional< AttributeT >, std::enable_if_t< std::is_base_of< Attribute, AttributeT >::value, std::optional< AttributeT > > >::parse(), mlir::FieldParser< std::optional< IntT >, std::enable_if_t< std::is_integral< IntT >::value, std::optional< IntT > > >::parse(), mlir::OpAsmParser::parseAssignmentList(), mlir::detail::Parser::parseAttribute(), mlir::AsmParser::parseDecimalInteger(), mlir::function_interface_impl::parseFunctionOp(), parseGEPIndices(), mlir::AsmParser::parseInteger(), parseKeyValuePair(), mlir::polynomial::parseMonomial(), mlir::detail::Parser::parseOptionalAttribute(), mlir::AsmParser::parseOptionalAttribute(), parseOptionalCallFuncPtr(), mlir::AsmParser::parseOptionalDecimalInteger(), parseSequenceOpOperands(), parseStorageType(), and parseStructMemberDecorations().
|
inline |
Definition at line 53 of file OpDefinition.h.
References value().
|
inline |
Access the internal ParseResult value.
Definition at line 52 of file OpDefinition.h.
Referenced by operator*(), mlir::OpAsmParser::parseAssignmentList(), parseGEPIndices(), parseKeyValuePair(), and parseSequenceOpOperands().