MLIR
20.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). 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< Constraint > | getConstraint () const |
If this is a type constraint, return it. 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... | |
const 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 |
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.
std::string AttrOrTypeParameter::getAccessorName | ( | ) | const |
Get the parameter accessor name.
Definition at line 272 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 277 of file AttrOrTypeDef.cpp.
StringRef AttrOrTypeParameter::getComparator | ( | ) | const |
If specified, get the custom comparator code for this parameter.
Definition at line 281 of file AttrOrTypeDef.cpp.
std::optional< Constraint > AttrOrTypeParameter::getConstraint | ( | ) | const |
If this is a type constraint, return it.
Definition at line 343 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 310 of file AttrOrTypeDef.cpp.
StringRef AttrOrTypeParameter::getCppAccessorType | ( | ) | const |
Get the C++ accessor type of this parameter.
Definition at line 302 of file AttrOrTypeDef.cpp.
References getCppType().
StringRef AttrOrTypeParameter::getCppStorageType | ( | ) | const |
Get the C++ storage type of this parameter.
Definition at line 306 of file AttrOrTypeDef.cpp.
References getCppType().
StringRef AttrOrTypeParameter::getCppType | ( | ) | const |
Get the C++ type of this parameter.
Definition at line 285 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 341 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 336 of file AttrOrTypeDef.cpp.
Referenced by isOptional().
StringRef AttrOrTypeParameter::getName | ( | ) | const |
Get the parameter name.
Definition at line 268 of file AttrOrTypeDef.cpp.
Referenced by getAccessorName().
std::optional< StringRef > AttrOrTypeParameter::getParser | ( | ) | const |
Get an optional C++ parameter parser.
Definition at line 314 of file AttrOrTypeDef.cpp.
std::optional< StringRef > AttrOrTypeParameter::getPrinter | ( | ) | const |
Get an optional C++ parameter printer.
Definition at line 318 of file AttrOrTypeDef.cpp.
std::optional< StringRef > AttrOrTypeParameter::getSummary | ( | ) | const |
Get a description of this parameter for documentation purposes.
Definition at line 322 of file AttrOrTypeDef.cpp.
StringRef AttrOrTypeParameter::getSyntax | ( | ) | const |
Get the assembly syntax documentation.
Definition at line 326 of file AttrOrTypeDef.cpp.
References getCppType(), and getDef().
bool AttrOrTypeParameter::isAnonymous | ( | ) | const |
Returns true if the parameter is anonymous (has no name).
Definition at line 264 of file AttrOrTypeDef.cpp.
bool AttrOrTypeParameter::isOptional | ( | ) | const |
Returns true if the parameter is optional.
Definition at line 332 of file AttrOrTypeDef.cpp.
References getDefaultValue().
|
inline |
Definition at line 114 of file AttrOrTypeDef.h.
|
inline |
The parameter is pointer-comparable.
Definition at line 111 of file AttrOrTypeDef.h.