MLIR 22.0.0git
mlir::AttrTypeSubElementHandler< T, Enable > Struct Template Reference

This class provides support for interacting with the SubElementInterfaces for different types of parameters. More...

#include "mlir/IR/AttrTypeSubElements.h"

Inheritance diagram for mlir::AttrTypeSubElementHandler< T, Enable >:

Public Types

using DefaultHandlerTag = void
 Tag indicating that this handler does not support sub-elements.

Static Public Member Functions

static void walk (const T &param, AttrTypeImmediateSubElementWalker &walker)
 Default walk implementation that does nothing.
template<typename ParamT>
static decltype(auto) replace (ParamT &&param, AttrSubElementReplacements &attrRepls, TypeSubElementReplacements &typeRepls)
 Default replace implementation just forwards the parameter.

Detailed Description

template<typename T, typename Enable = void>
struct mlir::AttrTypeSubElementHandler< T, Enable >

This class provides support for interacting with the SubElementInterfaces for different types of parameters.

An implementation of this class should be provided for any parameter class that may contain an attribute or type. There are two main methods of this class that need to be implemented:

  • walk

    This method should traverse into any sub elements of the parameter using the provided walker, or by invoking handlers for sub-types.

  • replace

    This method should extract any necessary sub elements using the provided replacer, or by invoking handlers for sub-types. The new post-replacement parameter value should be returned.

Definition at line 394 of file AttrTypeSubElements.h.

Member Typedef Documentation

◆ DefaultHandlerTag

template<typename T, typename Enable = void>
using mlir::AttrTypeSubElementHandler< T, Enable >::DefaultHandlerTag = void

Tag indicating that this handler does not support sub-elements.

Definition at line 408 of file AttrTypeSubElements.h.

Member Function Documentation

◆ replace()

template<typename T, typename Enable = void>
template<typename ParamT>
decltype(auto) mlir::AttrTypeSubElementHandler< T, Enable >::replace ( ParamT && param,
AttrSubElementReplacements & attrRepls,
TypeSubElementReplacements & typeRepls )
inlinestatic

◆ walk()

template<typename T, typename Enable = void>
void mlir::AttrTypeSubElementHandler< T, Enable >::walk ( const T & param,
AttrTypeImmediateSubElementWalker & walker )
inlinestatic

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