19#ifndef CIRCT_DIALECT_ARC_RUNTIME_FMTDESCRIPTOR_H
20#define CIRCT_DIALECT_ARC_RUNTIME_FMTDESCRIPTOR_H
40 std::memset(
this, 0,
sizeof(*
this));
78 bool isLeftAligned, int32_t specifierWidth,
79 bool isUpperCase,
bool isSigned) {
156static_assert(std::is_standard_layout_v<FmtDescriptor>,
157 "FmtDescriptor must be standard layout");
assert(baseType &&"element must be base type")
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
Integer formatting options.
bool isLeftAligned
Whether the value is left aligned.
bool isSigned
Whether to treat the value as signed.
bool isUpperCase
Whether to use uppercase hex letters.
char paddingChar
Padding character (NUL if no padding is desired).
int16_t specifierWidth
The minumum width of the output in characters.
int16_t bitwidth
The bitwidth of the integer value.
int8_t radix
The radix to use for formatting. Must be one of {2, 8, 10, 16}.
Literal string formatting options.
int64_t width
The width of the literal string in characters.
Literal string (small string optimization).
char data[8]
NUL-terminated string.
A format descriptor, to be given to arcRuntimeFormat.
FmtDescriptor()
Default construction creates an end of string descriptor.
static FmtDescriptor createChar()
Creates a char descriptor.
Action
The action to take for this descriptor.
@ Action_Char
Prints a character (c).
@ Action_Literal
Prints a literal string.
@ Action_End
End of the format string, no action to take.
@ Action_Int
Prints an integer.
@ Action_LiteralSmall
Prints a literal string (small string optimization).
static FmtDescriptor createSmallLiteral(std::string_view str)
Creates a small literal string descriptor.
static FmtDescriptor createInt(int32_t bitwidth, int8_t radix, bool isLeftAligned, int32_t specifierWidth, bool isUpperCase, bool isSigned)
Creates an integer descriptor.
static FmtDescriptor createLiteral(int64_t width)
Creates a literal string descriptor.
SmallLiteral smallLiteral