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

A wrapper class for tblgen AttrOrTypeParameter, arrays of which belong to AttrOrTypeDefs to parameterize them. More...

#include "mlir/TableGen/AttrOrTypeDef.h"

+ Inheritance diagram for mlir::tblgen::AttrOrTypeParameter:

Public Member Functions

 AttrOrTypeParameter (const llvm::DagInit *def, unsigned index)
 
bool isAnonymous () const
 Returns true if the parameter is anonymous (has no name). More...
 
StringRef getName () const
 Get the parameter name. More...
 
std::string getAccessorName () const
 Get the parameter accessor name. More...
 
std::optional< StringRef > getAllocator () const
 If specified, get the custom allocator code for this parameter. More...
 
StringRef getComparator () const
 If specified, get the custom comparator code for this parameter. More...
 
StringRef getCppType () const
 Get the C++ type of this parameter. More...
 
StringRef getCppAccessorType () const
 Get the C++ accessor type of this parameter. More...
 
StringRef getCppStorageType () const
 Get the C++ storage type of this parameter. More...
 
StringRef getConvertFromStorage () const
 Get the C++ code to convert from the storage type to the parameter type. More...
 
std::optional< StringRef > getParser () const
 Get an optional C++ parameter parser. More...
 
std::optional< StringRef > getPrinter () const
 Get an optional C++ parameter printer. More...
 
std::optional< StringRef > getSummary () const
 Get a description of this parameter for documentation purposes. More...
 
StringRef getSyntax () const
 Get the assembly syntax documentation. More...
 
bool isOptional () const
 Returns true if the parameter is optional. More...
 
std::optional< StringRef > getDefaultValue () const
 Get the default value of the parameter if it has one. More...
 
llvm::Init * getDef () const
 Return the underlying def of this parameter. More...
 
bool operator== (const AttrOrTypeParameter &other) const
 The parameter is pointer-comparable. More...
 
bool operator!= (const AttrOrTypeParameter &other) const
 

Detailed Description

A wrapper class for tblgen AttrOrTypeParameter, arrays of which belong to AttrOrTypeDefs to parameterize them.

Definition at line 53 of file AttrOrTypeDef.h.

Constructor & Destructor Documentation

◆ AttrOrTypeParameter()

mlir::tblgen::AttrOrTypeParameter::AttrOrTypeParameter ( const llvm::DagInit *  def,
unsigned  index 
)
inlineexplicit

Definition at line 55 of file AttrOrTypeDef.h.

Member Function Documentation

◆ getAccessorName()

std::string AttrOrTypeParameter::getAccessorName ( ) const

Get the parameter accessor name.

Definition at line 261 of file AttrOrTypeDef.cpp.

References getName().

◆ getAllocator()

std::optional< StringRef > AttrOrTypeParameter::getAllocator ( ) const

If specified, get the custom allocator code for this parameter.

Definition at line 266 of file AttrOrTypeDef.cpp.

◆ getComparator()

StringRef AttrOrTypeParameter::getComparator ( ) const

If specified, get the custom comparator code for this parameter.

Definition at line 270 of file AttrOrTypeDef.cpp.

◆ getConvertFromStorage()

StringRef AttrOrTypeParameter::getConvertFromStorage ( ) const

Get the C++ code to convert from the storage type to the parameter type.

Definition at line 300 of file AttrOrTypeDef.cpp.

◆ getCppAccessorType()

StringRef AttrOrTypeParameter::getCppAccessorType ( ) const

Get the C++ accessor type of this parameter.

Definition at line 291 of file AttrOrTypeDef.cpp.

References getCppType().

◆ getCppStorageType()

StringRef AttrOrTypeParameter::getCppStorageType ( ) const

Get the C++ storage type of this parameter.

Definition at line 296 of file AttrOrTypeDef.cpp.

References getCppType().

◆ getCppType()

StringRef AttrOrTypeParameter::getCppType ( ) const

Get the C++ type of this parameter.

Definition at line 274 of file AttrOrTypeDef.cpp.

References getDef().

Referenced by getCppAccessorType(), getCppStorageType(), and getSyntax().

◆ getDef()

llvm::Init * AttrOrTypeParameter::getDef ( ) const

Return the underlying def of this parameter.

Definition at line 332 of file AttrOrTypeDef.cpp.

Referenced by mlir::tblgen::AttributeSelfTypeParameter::classof(), getCppType(), and getSyntax().

◆ getDefaultValue()

std::optional< StringRef > AttrOrTypeParameter::getDefaultValue ( ) const

Get the default value of the parameter if it has one.

Definition at line 326 of file AttrOrTypeDef.cpp.

Referenced by isOptional().

◆ getName()

StringRef AttrOrTypeParameter::getName ( ) const

Get the parameter name.

Definition at line 257 of file AttrOrTypeDef.cpp.

Referenced by getAccessorName().

◆ getParser()

std::optional< StringRef > AttrOrTypeParameter::getParser ( ) const

Get an optional C++ parameter parser.

Definition at line 304 of file AttrOrTypeDef.cpp.

◆ getPrinter()

std::optional< StringRef > AttrOrTypeParameter::getPrinter ( ) const

Get an optional C++ parameter printer.

Definition at line 308 of file AttrOrTypeDef.cpp.

◆ getSummary()

std::optional< StringRef > AttrOrTypeParameter::getSummary ( ) const

Get a description of this parameter for documentation purposes.

Definition at line 312 of file AttrOrTypeDef.cpp.

◆ getSyntax()

StringRef AttrOrTypeParameter::getSyntax ( ) const

Get the assembly syntax documentation.

Definition at line 316 of file AttrOrTypeDef.cpp.

References getCppType(), and getDef().

◆ isAnonymous()

bool AttrOrTypeParameter::isAnonymous ( ) const

Returns true if the parameter is anonymous (has no name).

Definition at line 253 of file AttrOrTypeDef.cpp.

◆ isOptional()

bool AttrOrTypeParameter::isOptional ( ) const

Returns true if the parameter is optional.

Definition at line 322 of file AttrOrTypeDef.cpp.

References getDefaultValue().

◆ operator!=()

bool mlir::tblgen::AttrOrTypeParameter::operator!= ( const AttrOrTypeParameter other) const
inline

Definition at line 110 of file AttrOrTypeDef.h.

◆ operator==()

bool mlir::tblgen::AttrOrTypeParameter::operator== ( const AttrOrTypeParameter other) const
inline

The parameter is pointer-comparable.

Definition at line 107 of file AttrOrTypeDef.h.


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