13#ifndef MLIR_IR_OWNINGOPREF_H
14#define MLIR_IR_OWNINGOPREF_H
28template <
typename OpTy>
51 OpTy
get()
const {
return op; }
56 if constexpr (std::is_pointer<OpTy>::value)
61 explicit operator bool()
const {
return op; }
68 OpTy released(
nullptr);
69 std::swap(released, op);
Operation is the basic unit of execution within MLIR.
OpTy get() const
Allow accessing the internal op.
OpTy release()
Release the referenced op.
OpTy OperationT
The underlying operation type stored in this reference.
OwningOpRef & operator=(OwningOpRef &&other)
Assign from another op reference.
OwningOpRef(std::nullptr_t=nullptr)
OwningOpRef(OwningOpRef &&other)
Include the generated interface declarations.