MLIR  20.0.0git
Public Types | Public Member Functions | List of all members
mlir::OwningOpRef< OpTy > Class Template Reference

This class acts as an owning reference to an op, and will automatically destroy the held op on destruction if the held op is valid. More...

#include "mlir/IR/OwningOpRef.h"

+ Inheritance diagram for mlir::OwningOpRef< OpTy >:

Public Types

using OperationT = OpTy
 The underlying operation type stored in this reference. More...
 

Public Member Functions

 OwningOpRef (std::nullptr_t=nullptr)
 
 OwningOpRef (OpTy op)
 
 OwningOpRef (OwningOpRef &&other)
 
 ~OwningOpRef ()
 
OwningOpRefoperator= (OwningOpRef &&other)
 Assign from another op reference. More...
 
OpTy get () const
 Allow accessing the internal op. More...
 
OpTy operator* () const
 
auto operator-> ()
 
 operator bool () const
 
 operator OwningOpRef< Operation * > () &&
 Downcast to generic operation. More...
 
OpTy release ()
 Release the referenced op. More...
 

Detailed Description

template<typename OpTy>
class mlir::OwningOpRef< OpTy >

This class acts as an owning reference to an op, and will automatically destroy the held op on destruction if the held op is valid.

Note that OpBuilder and related functionality should be highly preferred instead, and this should only be used in situations where existing solutions are not viable.

Definition at line 29 of file OwningOpRef.h.

Member Typedef Documentation

◆ OperationT

template<typename OpTy >
using mlir::OwningOpRef< OpTy >::OperationT = OpTy

The underlying operation type stored in this reference.

Definition at line 32 of file OwningOpRef.h.

Constructor & Destructor Documentation

◆ OwningOpRef() [1/3]

template<typename OpTy >
mlir::OwningOpRef< OpTy >::OwningOpRef ( std::nullptr_t  = nullptr)
inline

Definition at line 34 of file OwningOpRef.h.

◆ OwningOpRef() [2/3]

template<typename OpTy >
mlir::OwningOpRef< OpTy >::OwningOpRef ( OpTy  op)
inline

Definition at line 35 of file OwningOpRef.h.

◆ OwningOpRef() [3/3]

template<typename OpTy >
mlir::OwningOpRef< OpTy >::OwningOpRef ( OwningOpRef< OpTy > &&  other)
inline

Definition at line 36 of file OwningOpRef.h.

◆ ~OwningOpRef()

template<typename OpTy >
mlir::OwningOpRef< OpTy >::~OwningOpRef ( )
inline

Definition at line 37 of file OwningOpRef.h.

Member Function Documentation

◆ get()

template<typename OpTy >
OpTy mlir::OwningOpRef< OpTy >::get ( ) const
inline

◆ operator bool()

template<typename OpTy >
mlir::OwningOpRef< OpTy >::operator bool ( ) const
inlineexplicit

Definition at line 61 of file OwningOpRef.h.

◆ operator OwningOpRef< Operation * >()

template<typename OpTy >
mlir::OwningOpRef< OpTy >::operator OwningOpRef< Operation * > ( ) &&
inline

Downcast to generic operation.

Definition at line 64 of file OwningOpRef.h.

References mlir::OwningOpRef< OpTy >::release().

◆ operator*()

template<typename OpTy >
OpTy mlir::OwningOpRef< OpTy >::operator* ( ) const
inline

Definition at line 52 of file OwningOpRef.h.

◆ operator->()

template<typename OpTy >
auto mlir::OwningOpRef< OpTy >::operator-> ( )
inline

Definition at line 53 of file OwningOpRef.h.

◆ operator=()

template<typename OpTy >
OwningOpRef& mlir::OwningOpRef< OpTy >::operator= ( OwningOpRef< OpTy > &&  other)
inline

Assign from another op reference.

Definition at line 43 of file OwningOpRef.h.

◆ release()

template<typename OpTy >
OpTy mlir::OwningOpRef< OpTy >::release ( )
inline

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