MLIR
20.0.0git
|
This class defines a manager for dialect resource blobs. More...
#include "mlir/IR/DialectResourceBlobManager.h"
Classes | |
class | BlobEntry |
The class represents an individual entry of a blob. More... | |
Public Member Functions | |
BlobEntry * | lookup (StringRef name) |
Return the blob registered for the given name, or nullptr if no blob is registered. More... | |
const BlobEntry * | lookup (StringRef name) const |
void | update (StringRef name, AsmResourceBlob &&newBlob) |
Update the blob for the entry defined by the provided name. More... | |
BlobEntry & | insert (StringRef name, std::optional< AsmResourceBlob > blob={}) |
Insert a new entry with the provided name and optional blob data. More... | |
template<typename HandleT > | |
HandleT | insert (typename HandleT::Dialect *dialect, StringRef name, std::optional< AsmResourceBlob > blob={}) |
Insertion method that returns a dialect specific handle to the inserted entry. More... | |
This class defines a manager for dialect resource blobs.
Blobs are uniqued by a given key, and represented using AsmResourceBlobs.
Definition at line 33 of file DialectResourceBlobManager.h.
auto DialectResourceBlobManager::insert | ( | StringRef | name, |
std::optional< AsmResourceBlob > | blob = {} |
||
) |
Insert a new entry with the provided name and optional blob data.
The name may be modified during insertion if another entry already exists with that name. Returns the inserted entry.
Definition at line 33 of file DialectResourceBlobManager.cpp.
|
inline |
Insertion method that returns a dialect specific handle to the inserted entry.
Definition at line 90 of file DialectResourceBlobManager.h.
auto DialectResourceBlobManager::lookup | ( | StringRef | name | ) |
Return the blob registered for the given name, or nullptr if no blob is registered.
Definition at line 19 of file DialectResourceBlobManager.cpp.
|
inline |
Definition at line 75 of file DialectResourceBlobManager.h.
References lookup().
void DialectResourceBlobManager::update | ( | StringRef | name, |
AsmResourceBlob && | newBlob | ||
) |
Update the blob for the entry defined by the provided name.
This method asserts that an entry for the given name exists in the manager.
Definition at line 26 of file DialectResourceBlobManager.cpp.
References lookup(), and mlir::DialectResourceBlobManager::BlobEntry::setBlob().
Referenced by mlir::ResourceBlobManagerDialectInterfaceBase< HandleT >::update().