3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-06 06:03:23 +00:00

Improvements in new RTLIL::IdString implementation

This commit is contained in:
Clifford Wolf 2014-08-02 15:44:10 +02:00
parent 8fd1c269ac
commit e590ffc84d
5 changed files with 65 additions and 33 deletions

View file

@ -205,11 +205,11 @@ const char *log_signal(const RTLIL::SigSpec &sig, bool autoint)
const char *log_id(RTLIL::IdString str)
{
if (str.size() > 1 && str[0] == '\\' && str[1] != '$')
string_buf.push_back(str.substr(1));
else
string_buf.push_back(str.str());
return string_buf.back().c_str();
const char *p = str;
log_assert(RTLIL::IdString::global_refcount_storage_[str.index_] > 1);
if (p[0] == '\\' && p[1] != '$' && p[1] != 0)
return p+1;
return p;
}
void log_cell(RTLIL::Cell *cell, std::string indent)