MLIR
20.0.0git
|
This class is used to build resource entries for use by the printer. More...
#include "mlir/IR/AsmState.h"
Public Member Functions | |
virtual | ~AsmResourceBuilder () |
virtual void | buildBool (StringRef key, bool data)=0 |
Build a resource entry represented by the given bool. More... | |
virtual void | buildString (StringRef key, StringRef data)=0 |
Build a resource entry represented by the given human-readable string value. More... | |
virtual void | buildBlob (StringRef key, ArrayRef< char > data, uint32_t dataAlignment)=0 |
Build an resource entry represented by the given binary blob data. More... | |
template<typename T > | |
std::enable_if_t<!std::is_same< T, char >::value > | buildBlob (StringRef key, ArrayRef< T > data) |
Build an resource entry represented by the given binary blob data. More... | |
void | buildBlob (StringRef key, const AsmResourceBlob &blob) |
Build an resource entry represented by the given resource blob. More... | |
This class is used to build resource entries for use by the printer.
Each resource entry is represented using a key/value pair. The provided key must be unique within the current context, which allows for a client to provide resource entries without worrying about overlap with other clients.
Definition at line 246 of file AsmState.h.
|
virtualdefault |
|
pure virtual |
Build an resource entry represented by the given binary blob data.
Referenced by buildBlob(), and mlir::ResourceBlobManagerDialectInterfaceBase< HandleT >::buildResources().
|
inline |
Build an resource entry represented by the given binary blob data.
This is a useful overload if the data type is known. Note that this does not support char
element types to avoid accidentally not providing the expected alignment of data in situations that treat blobs generically.
Definition at line 265 of file AsmState.h.
References buildBlob().
|
inline |
Build an resource entry represented by the given resource blob.
This is a useful overload if a blob already exists in-memory.
Definition at line 273 of file AsmState.h.
References buildBlob(), mlir::AsmResourceBlob::getData(), and mlir::AsmResourceBlob::getDataAlignment().
|
pure virtual |
Build a resource entry represented by the given bool.
|
pure virtual |
Build a resource entry represented by the given human-readable string value.