MLIR  21.0.0git
Static Public Member Functions | List of all members
mlir::detail::TypeIDResolver< T, Enable > Class Template Reference

This class provides a resolver for getting the ID for a given class T. More...

#include "mlir/Support/TypeID.h"

+ Inheritance diagram for mlir::detail::TypeIDResolver< T, Enable >:

Static Public Member Functions

static TypeID resolveTypeID ()
 

Additional Inherited Members

- Static Protected Member Functions inherited from mlir::detail::FallbackTypeIDResolver
static LLVM_ALWAYS_EXPORT TypeID registerImplicitTypeID (StringRef name)
 Register an implicit type ID for the given type name. More...
 

Detailed Description

template<typename T, typename Enable = void>
class mlir::detail::TypeIDResolver< T, Enable >

This class provides a resolver for getting the ID for a given class T.

This allows for the derived type to specialize its resolution behavior. The default implementation uses the string name of the type to resolve the ID. This provides a strong definition, but at the cost of performance (we need to do an initial lookup) and is not usable by classes defined in anonymous contexts.

TODO: The use of the type name is only necessary when building in the presence of shared libraries. We could add a build flag that guarantees "static"-like environments and switch this to a more optimal implementation when that is enabled.

Definition at line 203 of file TypeID.h.

Member Function Documentation

◆ resolveTypeID()

template<typename T , typename Enable = void>
static TypeID mlir::detail::TypeIDResolver< T, Enable >::resolveTypeID ( )
inlinestatic

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