MLIR
15.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 (llvm::NoneType) | |
bool | hasValue () const |
Returns true if we contain a valid ParseResult value. More... | |
ParseResult | getValue () 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 37 of file OpDefinition.h.
|
default |
|
inline |
Definition at line 40 of file OpDefinition.h.
|
inline |
Definition at line 41 of file OpDefinition.h.
|
inline |
Definition at line 42 of file OpDefinition.h.
|
inline |
Definition at line 44 of file OpDefinition.h.
|
inline |
Access the internal ParseResult value.
Definition at line 50 of file OpDefinition.h.
Referenced by mlir::scf::getParallelForInductionVarOwner(), operator*(), mlir::DataLayoutEntryAttr::parse(), parseGEPIndices(), and parseSwitchOpCases().
|
inline |
Returns true if we contain a valid ParseResult value.
Definition at line 47 of file OpDefinition.h.
Referenced by buildLLVMFunctionType(), mlir::scf::getParallelForInductionVarOwner(), isComputeOperation(), mlir::DataLayoutEntryAttr::parse(), mlir::detail::Parser::parseAttribute(), mlir::function_interface_impl::parseFunctionOp(), parseGEPIndices(), mlir::AsmParser::parseInteger(), mlir::detail::Parser::parseOptionalAttribute(), mlir::AsmParser::parseOptionalAttribute(), mlir::AsmParser::parseOptionalInteger(), parseOptionalLLVMKeyword(), parseStorageType(), parseStructMemberDecorations(), parseSwitchOpCases(), and verifyConstantType().
|
inline |
Definition at line 51 of file OpDefinition.h.
References mlir::impl::ensureRegionTerminator(), and getValue().