3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-07-18 21:25:47 +00:00
This commit is contained in:
Emil J. Tywoniak 2026-06-12 00:18:53 +02:00
parent afdae7b87e
commit c3ffbf6fae
229 changed files with 3902 additions and 3835 deletions

View file

@ -91,6 +91,20 @@ struct TW {
throw "unknown twine id";
}
static constexpr const char* static_names[] = {
#define X(N) #N,
#include "kernel/constids.inc"
#undef X
};
static std::string str(TwineRef ref) {
TwineRef idx = ref.untag();
if (idx.value >= STATIC_TWINE_END) return {};
std::string result = ref.is_public() ? "\\" : "";
result += static_names[idx.value];
return result;
}
};
#define TW(id) (size_t)lookup_well_known_id(#id)
@ -102,7 +116,6 @@ struct Twine {
struct Suffix {
TwineRef prefix;
std::string tail;
// TODO check
auto operator<=>(const Suffix&) const = default;
};