A helper union that can represent a StringAttr
, StringRef
, or Twine
.
More...
#include <BuilderUtils.h>
|
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.
◆ StringAttrOrRef() [1/6]
circt::StringAttrOrRef::StringAttrOrRef |
( |
| ) |
|
|
inline |
◆ StringAttrOrRef() [2/6]
circt::StringAttrOrRef::StringAttrOrRef |
( |
StringAttr |
attr | ) |
|
|
inline |
◆ StringAttrOrRef() [3/6]
circt::StringAttrOrRef::StringAttrOrRef |
( |
const StringRef & |
str | ) |
|
|
inline |
◆ StringAttrOrRef() [4/6]
circt::StringAttrOrRef::StringAttrOrRef |
( |
const char * |
ptr | ) |
|
|
inline |
◆ StringAttrOrRef() [5/6]
circt::StringAttrOrRef::StringAttrOrRef |
( |
const std::string & |
str | ) |
|
|
inline |
◆ StringAttrOrRef() [6/6]
circt::StringAttrOrRef::StringAttrOrRef |
( |
const Twine & |
twine | ) |
|
|
inline |
◆ get()
StringAttr circt::StringAttrOrRef::get |
( |
MLIRContext * |
context | ) |
const |
|
inline |
Return the represented string as a StringAttr
.
Definition at line 39 of file BuilderUtils.h.
References value.
◆ value
std::variant<StringAttr, StringRef, Twine, const char *> circt::StringAttrOrRef::value |
|
private |
The documentation for this class was generated from the following file:
- /home/runner/work/circt-www/circt-www/circt_src/include/circt/Support/BuilderUtils.h