mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-06 06:03:23 +00:00
Added id2cstr API
This commit is contained in:
parent
8a6b0a3520
commit
1bc0f04789
3 changed files with 17 additions and 10 deletions
|
@ -110,6 +110,13 @@ namespace RTLIL
|
|||
return str;
|
||||
}
|
||||
|
||||
static const char *id2cstr(std::string str) __attribute__((unused));
|
||||
static const char *id2cstr(std::string str) {
|
||||
if (str.size() > 1 && str[0] == '\\' && str[1] != '$')
|
||||
return str.c_str() + 1;
|
||||
return str.c_str();
|
||||
}
|
||||
|
||||
static IdString new_id(std::string file, int line, std::string func) __attribute__((unused));
|
||||
static IdString new_id(std::string file, int line, std::string func) {
|
||||
std::string str = "$auto$";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue