MLIR 22.0.0git
mlir::DialectResourceBlobHandle< DialectT > Struct Template Reference

This class defines a dialect specific handle to a resource blob. More...

#include "mlir/IR/DialectResourceBlobManager.h"

Inheritance diagram for mlir::DialectResourceBlobHandle< DialectT >:

Public Types

using ManagerInterface
Public Types inherited from mlir::AsmDialectResourceHandleBase< DialectResourceBlobHandle< DialectT >, DialectResourceBlobManager::BlobEntry, DialectT >
using Dialect

Public Member Functions

StringRef getKey () const
 Return the human readable string key for this handle.
AsmResourceBlobgetBlob ()
 Return the blob referenced by this handle if the underlying resource has been initialized.
const AsmResourceBlobgetBlob () const
Public Member Functions inherited from mlir::AsmDialectResourceHandleBase< DialectResourceBlobHandle< DialectT >, DialectResourceBlobManager::BlobEntry, DialectT >
 AsmDialectResourceHandleBase (DialectResourceBlobManager::BlobEntry *resource, DialectT *dialect)
 Construct a handle from a pointer to the resource.
DialectResourceBlobManager::BlobEntrygetResource ()
 Return the resource referenced by this handle.
DialectT * getDialect () const
 Return the dialect that owns the resource.
Public Member Functions inherited from mlir::AsmDialectResourceHandle
 AsmDialectResourceHandle ()=default
 AsmDialectResourceHandle (void *resource, TypeID resourceID, Dialect *dialect)
bool operator== (const AsmDialectResourceHandle &other) const
voidgetResource () const
 Return an opaque pointer to the referenced resource.
TypeID getTypeID () const
 Return the type ID of the resource.
DialectgetDialect () const
 Return the dialect that owns the resource.

Static Public Member Functions

static ManagerInterfacegetManagerInterface (MLIRContext *ctx)
 Get the interface for the dialect that owns handles of this type.
Static Public Member Functions inherited from mlir::AsmDialectResourceHandleBase< DialectResourceBlobHandle< DialectT >, DialectResourceBlobManager::BlobEntry, DialectT >
static bool classof (const AsmDialectResourceHandle *handle)
 Support llvm style casting.

Detailed Description

template<typename DialectT>
struct mlir::DialectResourceBlobHandle< DialectT >

This class defines a dialect specific handle to a resource blob.

These handles utilize a StringRef for the internal key, and an AsmResourceBlob as the underlying data.

Definition at line 187 of file DialectResourceBlobManager.h.

Member Typedef Documentation

◆ ManagerInterface

template<typename DialectT>
using mlir::DialectResourceBlobHandle< DialectT >::ManagerInterface
Initial value:
This class provides a base class for dialects implementing the resource blob interface.
This class defines a dialect specific handle to a resource blob.

Definition at line 194 of file DialectResourceBlobManager.h.

Member Function Documentation

◆ getBlob() [1/2]

template<typename DialectT>
AsmResourceBlob * mlir::DialectResourceBlobHandle< DialectT >::getBlob ( )
inline

Return the blob referenced by this handle if the underlying resource has been initialized.

Returns nullptr otherwise.

Definition at line 202 of file DialectResourceBlobManager.h.

◆ getBlob() [2/2]

template<typename DialectT>
const AsmResourceBlob * mlir::DialectResourceBlobHandle< DialectT >::getBlob ( ) const
inline

Definition at line 203 of file DialectResourceBlobManager.h.

◆ getKey()

template<typename DialectT>
StringRef mlir::DialectResourceBlobHandle< DialectT >::getKey ( ) const
inline

Return the human readable string key for this handle.

Definition at line 198 of file DialectResourceBlobManager.h.

◆ getManagerInterface()

template<typename DialectT>
ManagerInterface & mlir::DialectResourceBlobHandle< DialectT >::getManagerInterface ( MLIRContext * ctx)
inlinestatic

Get the interface for the dialect that owns handles of this type.

Asserts that the dialect is registered.

Definition at line 209 of file DialectResourceBlobManager.h.


The documentation for this struct was generated from the following files: