MLIR
18.0.0git
|
This class contains a single method parameter for a C++ function. More...
#include "mlir/TableGen/Class.h"
Public Member Functions | |
template<typename TypeT , typename NameT , typename DefaultT > | |
MethodParameter (TypeT &&type, NameT &&name, DefaultT &&defaultValue, bool optional=false) | |
Create a method parameter with a C++ type, parameter name, and an optional default value. More... | |
template<typename TypeT , typename NameT > | |
MethodParameter (TypeT &&type, NameT &&name, bool optional=false) | |
Create a method parameter with a C++ type, parameter name, and no default value. More... | |
void | writeDeclTo (raw_indented_ostream &os) const |
Write the parameter as part of a method declaration. More... | |
void | writeDefTo (raw_indented_ostream &os) const |
Write the parameter as part of a method definition. More... | |
StringRef | getType () const |
Get the C++ type. More... | |
bool | hasDefaultValue () const |
Returns true if the parameter has a default value. More... | |
This class contains a single method parameter for a C++ function.
|
inline |
|
inline |
|
inline |
|
inline |
Returns true if the parameter has a default value.
Definition at line 71 of file Class.h.
Referenced by writeDeclTo().
void MethodParameter::writeDeclTo | ( | raw_indented_ostream & | os | ) | const |
Write the parameter as part of a method declaration.
Definition at line 28 of file Class.cpp.
References getSpaceAfterType(), and hasDefaultValue().
void MethodParameter::writeDefTo | ( | raw_indented_ostream & | os | ) | const |
Write the parameter as part of a method definition.
Definition at line 36 of file Class.cpp.
References getSpaceAfterType().