MLIR 23.0.0git
mlir::PropertyRef Class Reference

Type-safe wrapper around a void* for passing properties, including the properties structs of operations, generically through APIs. More...

#include "mlir/IR/OperationSupport.h"

Public Member Functions

 PropertyRef ()=default
 PropertyRef (TypeID typeID, void *data)
 operator bool () const
template<typename Dest>
Dest as () const
TypeID getTypeID () const

Detailed Description

Type-safe wrapper around a void* for passing properties, including the properties structs of operations, generically through APIs.

Pairs data with a TypeID for assert-based type checking. Note that the type in the type ID is the storage type of the property, and that the default object has a null data pointer and a type ID equal to the type ID for void.

Definition at line 74 of file OperationSupport.h.

Constructor & Destructor Documentation

◆ PropertyRef() [1/2]

mlir::PropertyRef::PropertyRef ( )
default

◆ PropertyRef() [2/2]

mlir::PropertyRef::PropertyRef ( TypeID typeID,
void * data )
inline

Definition at line 77 of file OperationSupport.h.

Member Function Documentation

◆ as()

◆ getTypeID()

TypeID mlir::PropertyRef::getTypeID ( ) const
inline

Definition at line 88 of file OperationSupport.h.

◆ operator bool()

mlir::PropertyRef::operator bool ( ) const
inline

Definition at line 78 of file OperationSupport.h.


The documentation for this class was generated from the following file: