|
MLIR 23.0.0git
|
A wrapper class for tblgen AttrOrTypeParameter, arrays of which belong to AttrOrTypeDefs to parameterize them. More...
#include "mlir/TableGen/AttrOrTypeDef.h"
Public Member Functions | |
| AttrOrTypeParameter (const llvm::DagInit *def, unsigned index) | |
| bool | isAnonymous () const |
| Returns true if the parameter is anonymous (has no name). | |
| StringRef | getName () const |
| Get the parameter name. | |
| std::string | getAccessorName () const |
| Get the parameter accessor name. | |
| std::optional< StringRef > | getAllocator () const |
| If specified, get the custom allocator code for this parameter. | |
| bool | hasCustomComparator () const |
| Return true if user defined comparator is specified. | |
| StringRef | getComparator () const |
| Get the custom comparator code for this parameter or fallback to the default. | |
| StringRef | getCppType () const |
| Get the C++ type of this parameter. | |
| StringRef | getCppAccessorType () const |
| Get the C++ accessor type of this parameter. | |
| StringRef | getCppStorageType () const |
| Get the C++ storage type of this parameter. | |
| StringRef | getConvertFromStorage () const |
| Get the C++ code to convert from the storage type to the parameter type. | |
| std::optional< StringRef > | getParser () const |
| Get an optional C++ parameter parser. | |
| std::optional< Constraint > | getConstraint () const |
| If this is a type constraint, return it. | |
| std::optional< StringRef > | getPrinter () const |
| Get an optional C++ parameter printer. | |
| std::optional< StringRef > | getSummary () const |
| Get a description of this parameter for documentation purposes. | |
| StringRef | getSyntax () const |
| Get the assembly syntax documentation. | |
| bool | isOptional () const |
| Returns true if the parameter is optional. | |
| std::optional< StringRef > | getDefaultValue () const |
| Get the default value of the parameter if it has one. | |
| const llvm::Init * | getDef () const |
| Return the underlying def of this parameter. | |
| bool | operator== (const AttrOrTypeParameter &other) const |
| The parameter is pointer-comparable. | |
| bool | operator!= (const AttrOrTypeParameter &other) const |
A wrapper class for tblgen AttrOrTypeParameter, arrays of which belong to AttrOrTypeDefs to parameterize them.
Definition at line 54 of file AttrOrTypeDef.h.
|
inlineexplicit |
Definition at line 56 of file AttrOrTypeDef.h.
Referenced by mlir::tblgen::AttributeSelfTypeParameter::classof(), operator!=(), and operator==().
| std::string AttrOrTypeParameter::getAccessorName | ( | ) | const |
Get the parameter accessor name.
Definition at line 278 of file AttrOrTypeDef.cpp.
References getName().
| std::optional< StringRef > AttrOrTypeParameter::getAllocator | ( | ) | const |
If specified, get the custom allocator code for this parameter.
Definition at line 283 of file AttrOrTypeDef.cpp.
| StringRef AttrOrTypeParameter::getComparator | ( | ) | const |
Get the custom comparator code for this parameter or fallback to the default.
Definition at line 291 of file AttrOrTypeDef.cpp.
| std::optional< Constraint > AttrOrTypeParameter::getConstraint | ( | ) | const |
If this is a type constraint, return it.
Definition at line 352 of file AttrOrTypeDef.cpp.
References getDef().
Referenced by mlir::tblgen::AttrOrTypeDef::genVerifyInvariantsImpl().
| StringRef AttrOrTypeParameter::getConvertFromStorage | ( | ) | const |
Get the C++ code to convert from the storage type to the parameter type.
Definition at line 319 of file AttrOrTypeDef.cpp.
| StringRef AttrOrTypeParameter::getCppAccessorType | ( | ) | const |
Get the C++ accessor type of this parameter.
Definition at line 311 of file AttrOrTypeDef.cpp.
References getCppType().
| StringRef AttrOrTypeParameter::getCppStorageType | ( | ) | const |
Get the C++ storage type of this parameter.
Definition at line 315 of file AttrOrTypeDef.cpp.
References getCppType().
| StringRef AttrOrTypeParameter::getCppType | ( | ) | const |
Get the C++ type of this parameter.
Definition at line 295 of file AttrOrTypeDef.cpp.
References getDef().
Referenced by getCppAccessorType(), getCppStorageType(), and getSyntax().
| const Init * AttrOrTypeParameter::getDef | ( | ) | const |
Return the underlying def of this parameter.
Definition at line 350 of file AttrOrTypeDef.cpp.
Referenced by mlir::tblgen::AttributeSelfTypeParameter::classof(), getConstraint(), getCppType(), and getSyntax().
| std::optional< StringRef > AttrOrTypeParameter::getDefaultValue | ( | ) | const |
Get the default value of the parameter if it has one.
Definition at line 345 of file AttrOrTypeDef.cpp.
References result.
Referenced by isOptional().
| StringRef AttrOrTypeParameter::getName | ( | ) | const |
Get the parameter name.
Definition at line 274 of file AttrOrTypeDef.cpp.
Referenced by getAccessorName().
| std::optional< StringRef > AttrOrTypeParameter::getParser | ( | ) | const |
Get an optional C++ parameter parser.
Definition at line 323 of file AttrOrTypeDef.cpp.
| std::optional< StringRef > AttrOrTypeParameter::getPrinter | ( | ) | const |
Get an optional C++ parameter printer.
Definition at line 327 of file AttrOrTypeDef.cpp.
| std::optional< StringRef > AttrOrTypeParameter::getSummary | ( | ) | const |
Get a description of this parameter for documentation purposes.
Definition at line 331 of file AttrOrTypeDef.cpp.
| StringRef AttrOrTypeParameter::getSyntax | ( | ) | const |
Get the assembly syntax documentation.
Definition at line 335 of file AttrOrTypeDef.cpp.
References getCppType(), and getDef().
| bool AttrOrTypeParameter::hasCustomComparator | ( | ) | const |
Return true if user defined comparator is specified.
Definition at line 287 of file AttrOrTypeDef.cpp.
| bool AttrOrTypeParameter::isAnonymous | ( | ) | const |
Returns true if the parameter is anonymous (has no name).
Definition at line 270 of file AttrOrTypeDef.cpp.
| bool AttrOrTypeParameter::isOptional | ( | ) | const |
Returns true if the parameter is optional.
Definition at line 341 of file AttrOrTypeDef.cpp.
References getDefaultValue().
|
inline |
Definition at line 118 of file AttrOrTypeDef.h.
References AttrOrTypeParameter().
|
inline |
The parameter is pointer-comparable.
Definition at line 115 of file AttrOrTypeDef.h.
References AttrOrTypeParameter().