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

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

#include "mlir/TableGen/AttrOrTypeDef.h"

+ Inheritance diagram for mlir::tblgen::AttrDef:

Public Member Functions

std::optional< StringRef > getTypeBuilder () const
 Returns the attributes value type builder code block, or std::nullopt if it doesn't have one. More...
 
StringRef getAttrName () const
 Get the unique attribute name "dialect.attrname". 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...
 
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 AttrDef record.

Definition at line 251 of file AttrOrTypeDef.h.

Member Function Documentation

◆ AttrOrTypeDef()

AttrOrTypeDef::AttrOrTypeDef
explicit

Definition at line 145 of file AttrOrTypeDef.cpp.

◆ classof()

bool AttrDef::classof ( const AttrOrTypeDef def)
static

Definition at line 219 of file AttrOrTypeDef.cpp.

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

◆ getAttrName()

StringRef AttrDef::getAttrName ( ) const

Get the unique attribute name "dialect.attrname".

Definition at line 223 of file AttrOrTypeDef.cpp.

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

◆ getTypeBuilder()

std::optional< StringRef > AttrDef::getTypeBuilder ( ) const

Returns the attributes value type builder code block, or std::nullopt if it doesn't have one.

Definition at line 215 of file AttrOrTypeDef.cpp.

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


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