|
CIRCT 22.0.0git
|
A helper union that can represent a StringAttr, StringRef, or Twine.
More...
#include <BuilderUtils.h>

Public Member Functions | |
| StringAttrOrRef () | |
| StringAttrOrRef (StringAttr attr) | |
| StringAttrOrRef (const StringRef &str) | |
| StringAttrOrRef (const char *ptr) | |
| StringAttrOrRef (const std::string &str) | |
| StringAttrOrRef (const Twine &twine) | |
| StringAttr | get (MLIRContext *context) const |
Return the represented string as a StringAttr. | |
Private Attributes | |
| std::variant< StringAttr, StringRef, Twine, const char * > | value |
A helper union that can represent a StringAttr, StringRef, or Twine.
It is intended to be used as arguments to an op's build function. This allows a single builder to accept any flavor value for a string attribute. The get function can then be used to obtain a StringAttr from any of the possible variants StringAttrOrRef can take.
Definition at line 27 of file BuilderUtils.h.
|
inline |
Definition at line 31 of file BuilderUtils.h.
|
inline |
Definition at line 32 of file BuilderUtils.h.
|
inline |
Definition at line 33 of file BuilderUtils.h.
|
inline |
Definition at line 34 of file BuilderUtils.h.
|
inline |
Definition at line 35 of file BuilderUtils.h.
|
inline |
Definition at line 36 of file BuilderUtils.h.
|
inline |
Return the represented string as a StringAttr.
Definition at line 39 of file BuilderUtils.h.
References value.
|
private |
Definition at line 28 of file BuilderUtils.h.
Referenced by get(), synth.Object::is_output_port(), and Python.support.OpOperand::type().