MLIR
20.0.0git
|
This class represents an instance of a resource printer. More...
#include "mlir/IR/AsmState.h"
Public Member Functions | |
AsmResourcePrinter (StringRef name) | |
Create a new printer with the given identifying name. More... | |
virtual | ~AsmResourcePrinter () |
StringRef | getName () const |
Return the name of this printer. More... | |
virtual void | buildResources (Operation *op, AsmResourceBuilder &builder) const =0 |
Build any resources to include during printing, utilizing the given top-level root operation to help determine what information to include. More... | |
Static Public Member Functions | |
template<typename CallableT > | |
static std::unique_ptr< AsmResourcePrinter > | fromCallable (StringRef name, CallableT &&printFn) |
Return a resource printer implemented via the given callable, whose form should match that of buildResources above. More... | |
This class represents an instance of a resource printer.
This class should be implemented by non-dialect clients that want to inject additional resources into MLIR assembly formats.
Definition at line 377 of file AsmState.h.
|
inline |
Create a new printer with the given identifying name.
This name uniquely identifies the entries of this printer, and differentiates them from other contexts.
Definition at line 382 of file AsmState.h.
Referenced by fromCallable().
|
virtualdefault |
|
pure virtual |
Build any resources to include during printing, utilizing the given top-level root operation to help determine what information to include.
Provided data should be registered in the form of a key/data pair, to the given builder.
Referenced by fromCallable().
|
inlinestatic |
Return a resource printer implemented via the given callable, whose form should match that of buildResources
above.
Definition at line 398 of file AsmState.h.
References AsmResourcePrinter(), and buildResources().
Referenced by mlir::BytecodeWriterConfig::attachResourcePrinter(), mlir::AsmState::attachResourcePrinter(), and mlir::FallbackAsmResourceMap::getPrinters().
|
inline |
Return the name of this printer.
Definition at line 386 of file AsmState.h.