CIRCT
18.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 Twine &twine) | |
StringAttr | get (MLIRContext *context) const |
Return the represented string as a StringAttr . More... | |
Private Types | |
using | Value = llvm::PointerUnion< StringAttr, StringRef *, Twine * > |
Private Attributes | |
Value | 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 22 of file BuilderUtils.h.
|
private |
Definition at line 23 of file BuilderUtils.h.
|
inline |
Definition at line 27 of file BuilderUtils.h.
|
inline |
Definition at line 28 of file BuilderUtils.h.
|
inline |
Definition at line 29 of file BuilderUtils.h.
|
inline |
Definition at line 31 of file BuilderUtils.h.
|
inline |
Return the represented string as a StringAttr
.
Definition at line 34 of file BuilderUtils.h.
References circt::calyx::direction::get(), and value.
|
private |
Definition at line 24 of file BuilderUtils.h.
Referenced by get(), and Python.support.OpOperand::type().