MLIR
20.0.0git
|
This class represents a CRTP base class for dialect resource handles. More...
#include "mlir/IR/OpImplementation.h"
Public Types | |
using | Dialect = DialectT |
Public Member Functions | |
AsmDialectResourceHandleBase (ResourceT *resource, DialectT *dialect) | |
Construct a handle from a pointer to the resource. More... | |
AsmDialectResourceHandleBase (AsmDialectResourceHandle handle) | |
ResourceT * | getResource () |
Return the resource referenced by this handle. More... | |
const ResourceT * | getResource () const |
DialectT * | getDialect () const |
Return the dialect that owns the resource. More... | |
Public Member Functions inherited from mlir::AsmDialectResourceHandle | |
AsmDialectResourceHandle ()=default | |
AsmDialectResourceHandle (void *resource, TypeID resourceID, Dialect *dialect) | |
bool | operator== (const AsmDialectResourceHandle &other) const |
void * | getResource () const |
Return an opaque pointer to the referenced resource. More... | |
TypeID | getTypeID () const |
Return the type ID of the resource. More... | |
Dialect * | getDialect () const |
Return the dialect that owns the resource. More... | |
Static Public Member Functions | |
static bool | classof (const AsmDialectResourceHandle *handle) |
Support llvm style casting. More... | |
This class represents a CRTP base class for dialect resource handles.
It abstracts away various utilities necessary for defined derived resource handles.
Definition at line 64 of file OpImplementation.h.
using mlir::AsmDialectResourceHandleBase< DerivedT, ResourceT, DialectT >::Dialect = DialectT |
Definition at line 66 of file OpImplementation.h.
|
inline |
Construct a handle from a pointer to the resource.
The given pointer should be guaranteed to live beyond the life of this handle.
Definition at line 70 of file OpImplementation.h.
|
inline |
Definition at line 72 of file OpImplementation.h.
References mlir::AsmDialectResourceHandle::getTypeID().
|
inlinestatic |
Support llvm style casting.
Definition at line 91 of file OpImplementation.h.
References mlir::AsmDialectResourceHandle::getTypeID().
|
inline |
Return the dialect that owns the resource.
Definition at line 86 of file OpImplementation.h.
References mlir::AsmDialectResourceHandle::getDialect().
|
inline |
Return the resource referenced by this handle.
Definition at line 78 of file OpImplementation.h.
References mlir::AsmDialectResourceHandle::getResource().
Referenced by mlir::AsmDialectResourceHandleBase< DerivedT, ResourceT, DialectT >::getResource().
|
inline |
Definition at line 81 of file OpImplementation.h.
References mlir::AsmDialectResourceHandleBase< DerivedT, ResourceT, DialectT >::getResource().