MLIR
20.0.0git
|
This class represents an instance of a resource parser. More...
#include "mlir/IR/AsmState.h"
Public Member Functions | |
AsmResourceParser (StringRef name) | |
Create a new parser with the given identifying name. More... | |
virtual | ~AsmResourceParser () |
StringRef | getName () const |
Return the name of this parser. More... | |
virtual LogicalResult | parseResource (AsmParsedResourceEntry &entry)=0 |
Parse the given resource entry. More... | |
Static Public Member Functions | |
template<typename CallableT > | |
static std::unique_ptr< AsmResourceParser > | fromCallable (StringRef name, CallableT &&parseFn) |
Return a resource parser implemented via the given callable, whose form should match that of parseResource above. More... | |
This class represents an instance of a resource parser.
This class should be implemented by non-dialect clients that want to inject additional resources into MLIR assembly formats.
Definition at line 337 of file AsmState.h.
|
inline |
Create a new parser with the given identifying name.
This name uniquely identifies the entries of this parser, and differentiates them from other contexts.
Definition at line 342 of file AsmState.h.
Referenced by fromCallable().
|
virtualdefault |
|
inlinestatic |
Return a resource parser implemented via the given callable, whose form should match that of parseResource
above.
Definition at line 356 of file AsmState.h.
References AsmResourceParser(), and parseResource().
Referenced by mlir::ParserConfig::attachResourceParser().
|
inline |
Return the name of this parser.
Definition at line 346 of file AsmState.h.
|
pure virtual |
Parse the given resource entry.
Returns failure if the key/data were not valid, or could otherwise not be processed correctly. Any necessary errors should be emitted with the provided entry.
Referenced by fromCallable().