LLZK 0.1.0
Veridise's ZK Language IR
|
Note: If any symbol refs in an input Type/Attribute use any of the special characters that this class generates, they are not escaped. More...
#include <TypeHelper.h>
Static Public Member Functions | |
static std::string | from (mlir::Type type) |
Return a brief string representation of the given LLZK type. | |
static std::string | from (mlir::ArrayRef< mlir::Attribute > attrs) |
Return a brief string representation of the attribute list from a parameterized type. | |
static std::string | from (const std::string &base, mlir::ArrayRef< mlir::Attribute > attrs) |
Take an existing name prefix/base that contains N>=0 PLACEHOLDER character(s) and the Attribute list (size>=N) from a parameterized type. | |
Note: If any symbol refs in an input Type/Attribute use any of the special characters that this class generates, they are not escaped.
That means these string representations are not safe to reverse back into a Type. It's only intended to produce a unique name for instantiated structs that may give some hint when debugging regarding the original struct name and the params used.
Definition at line 36 of file TypeHelper.h.
|
static |
Take an existing name prefix/base that contains N>=0 PLACEHOLDER
character(s) and the Attribute list (size>=N) from a parameterized type.
The first N elements in the list are formatted and used to replace the PLACEHOLDER
character(s) in the base string. The remaining Attribute elements, if any, are formatted and appended to the end. Occurrences of nullptr
in the Attribute list are formatted as the PLACEHOLDER
character itself to allow for partial instantiation of a parameterized type, preserving the location of attributes that were not available in an earlier instantiation so they can be added by a later instantiation.
|
inlinestatic |
Return a brief string representation of the attribute list from a parameterized type.
Occurrences of nullptr
are represented with a PLACEHOLDER
character.
Definition at line 58 of file TypeHelper.h.
|
inlinestatic |
Return a brief string representation of the given LLZK type.
Definition at line 52 of file TypeHelper.h.