mirror of
https://github.com/YosysHQ/yosys
synced 2025-09-14 05:31:29 +00:00
Ensure static IdStrings get prepopulated when initializing yosys
An alternative would be to call ensure_prepopulated() in various IdString methods.
This commit is contained in:
parent
ca9d1e5fd8
commit
0068b71558
2 changed files with 9 additions and 2 deletions
|
@ -217,8 +217,7 @@ struct RTLIL::IdString
|
|||
return it->second;
|
||||
}
|
||||
|
||||
if (global_id_index_.empty())
|
||||
prepopulate();
|
||||
ensure_prepopulated();
|
||||
|
||||
if (!p[0])
|
||||
return 0;
|
||||
|
@ -457,6 +456,12 @@ struct RTLIL::IdString
|
|||
|
||||
private:
|
||||
static void prepopulate();
|
||||
|
||||
public:
|
||||
static void ensure_prepopulated() {
|
||||
if (global_id_index_.empty())
|
||||
prepopulate();
|
||||
}
|
||||
};
|
||||
|
||||
namespace hashlib {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue