MLIR
20.0.0git
|
This class contains the body of a C++ method. More...
#include "mlir/TableGen/Class.h"
Public Member Functions | |
MethodBody (bool declOnly) | |
Create a method body, indicating whether it should be elided for methods that are declaration-only. More... | |
MethodBody (MethodBody &&other) | |
Define a move constructor to correctly initialize the streams. More... | |
MethodBody & | operator= (MethodBody &&body) |
Define a move assignment operator. More... | |
template<typename ValueT > | |
MethodBody & | operator<< (ValueT &&value) |
Write a value to the method body. More... | |
void | writeTo (raw_indented_ostream &os) const |
Write the method body to the output stream. More... | |
MethodBody & | indent () |
Indent the output stream. More... | |
MethodBody & | unindent () |
Unindent the output stream. More... | |
raw_indented_ostream::DelimitedScope | scope (StringRef open="", StringRef close="", bool indent=false) |
Create a delimited scope: immediately print open , indent if indent is true, and print close on object destruction. More... | |
raw_indented_ostream & | getStream () |
Get the underlying indented output stream. More... | |
MethodBody::MethodBody | ( | bool | declOnly | ) |
Create a method body, indicating whether it should be elided for methods that are declaration-only.
Definition at line 112 of file Class.cpp.
Referenced by operator=().
|
inline |
|
inline |
|
inline |
Indent the output stream.
Definition at line 230 of file Class.h.
References mlir::raw_indented_ostream::indent().
Referenced by scope().
|
inline |
|
inline |
Define a move assignment operator.
raw_ostream
has deleted assignment operators, so reinitialize the whole object.
Definition at line 209 of file Class.h.
References MethodBody().
|
inline |
Create a delimited scope: immediately print open
, indent if indent
is true, and print close
on object destruction.
Definition at line 242 of file Class.h.
References indent(), and mlir::raw_indented_ostream::scope().
|
inline |
Unindent the output stream.
Definition at line 235 of file Class.h.
References mlir::raw_indented_ostream::unindent().
void MethodBody::writeTo | ( | raw_indented_ostream & | os | ) | const |
Write the method body to the output stream.
The body can be written as part of the declaration of an inline method or just in the definition.
Definition at line 115 of file Class.cpp.
Referenced by mlir::tblgen::Method::writeDeclTo().