MLIR  20.0.0git
Public Member Functions | Static Public Member Functions | List of all members
mlir::tblgen::TypeDef Class Reference

This class represents a wrapper around a tablegen TypeDef record. More...

#include "mlir/TableGen/AttrOrTypeDef.h"

+ Inheritance diagram for mlir::tblgen::TypeDef:

Public Member Functions

StringRef getTypeName () const
 Get the unique type name "dialect.typename". More...
 
 AttrOrTypeDef (const llvm::Record *def)
 
- Public Member Functions inherited from mlir::tblgen::AttrOrTypeDef
 AttrOrTypeDef (const llvm::Record *def)
 
Dialect getDialect () const
 Get the dialect for which this def belongs. More...
 
StringRef getName () const
 Returns the name of this AttrOrTypeDef record. More...
 
bool hasDescription () const
 Query functions for the documentation of the def. More...
 
StringRef getDescription () const
 
bool hasSummary () const
 
StringRef getSummary () const
 
StringRef getCppClassName () const
 Returns the name of the C++ class to generate. More...
 
StringRef getCppBaseClassName () const
 Returns the name of the C++ base class to use when generating this def. More...
 
StringRef getStorageClassName () const
 Returns the name of the storage class for this def. More...
 
StringRef getStorageNamespace () const
 Returns the C++ namespace for this def's storage class. More...
 
bool genStorageClass () const
 Returns true if we should generate the storage class. More...
 
bool hasStorageCustomConstructor () const
 Indicates whether or not to generate the storage class constructor. More...
 
ArrayRef< AttrOrTypeParametergetParameters () const
 Get the parameters of this attribute or type. More...
 
unsigned getNumParameters () const
 Return the number of parameters. More...
 
std::optional< StringRef > getMnemonic () const
 Return the keyword/mnemonic to use in the printer/parser methods if we are supposed to auto-generate them. More...
 
bool hasCustomAssemblyFormat () const
 Returns if the attribute or type has a custom assembly format implemented in C++. More...
 
std::optional< StringRef > getAssemblyFormat () const
 Returns the custom assembly format, if one was specified. More...
 
bool genAccessors () const
 Returns true if the accessors based on the parameters should be generated. More...
 
bool genVerifyDecl () const
 Return true if we need to generate the verify declaration and getChecked method. More...
 
bool genVerifyInvariantsImpl () const
 Return true if we need to generate any type constraint verification and the getChecked method. More...
 
std::optional< StringRef > getExtraDecls () const
 Returns the def's extra class declaration code. More...
 
std::optional< StringRef > getExtraDefs () const
 Returns the def's extra class definition code. More...
 
ArrayRef< SMLoc > getLoc () const
 Get the code location (for error printing). More...
 
bool skipDefaultBuilders () const
 Returns true if the default get/getChecked methods should be skipped during generation. More...
 
ArrayRef< AttrOrTypeBuildergetBuilders () const
 Returns the builders of this def. More...
 
ArrayRef< TraitgetTraits () const
 Returns the traits of this def. More...
 
bool operator== (const AttrOrTypeDef &other) const
 Returns whether two AttrOrTypeDefs are equal by checking the equality of the underlying record. More...
 
bool operator< (const AttrOrTypeDef &other) const
 Compares two AttrOrTypeDefs by comparing the names of the dialects. More...
 
 operator bool () const
 Returns whether the AttrOrTypeDef is defined. More...
 
const llvm::Record * getDef () const
 Return the underlying def. More...
 

Static Public Member Functions

static bool classof (const AttrOrTypeDef *def)
 

Additional Inherited Members

- Protected Attributes inherited from mlir::tblgen::AttrOrTypeDef
const llvm::Record * def
 
SmallVector< AttrOrTypeBuilderbuilders
 The builders of this definition. More...
 
SmallVector< Traittraits
 The traits of this definition. More...
 
SmallVector< AttrOrTypeParameterparameters
 The parameters of this attribute or type. More...
 

Detailed Description

This class represents a wrapper around a tablegen TypeDef record.

Definition at line 278 of file AttrOrTypeDef.h.

Member Function Documentation

◆ AttrOrTypeDef()

AttrOrTypeDef::AttrOrTypeDef
explicit

Definition at line 149 of file AttrOrTypeDef.cpp.

◆ classof()

bool TypeDef::classof ( const AttrOrTypeDef def)
static

Definition at line 242 of file AttrOrTypeDef.cpp.

References mlir::tblgen::AttrOrTypeDef::def.

◆ getTypeName()

StringRef TypeDef::getTypeName ( ) const

Get the unique type name "dialect.typename".

Definition at line 246 of file AttrOrTypeDef.cpp.

References mlir::tblgen::AttrOrTypeDef::def.


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