mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-01 20:01:21 +00:00
Use set for strpool_attribute to maintain ordering, but keep some backwards compatibility
This commit is contained in:
parent
3a67468860
commit
8117ab228e
4 changed files with 16 additions and 2 deletions
|
@ -708,6 +708,14 @@ void RTLIL::AttrObject::add_strpool_attribute(const RTLIL::IdString& id, const s
|
|||
set_strpool_attribute(id, union_data);
|
||||
}
|
||||
|
||||
void RTLIL::AttrObject::add_strpool_attribute(const RTLIL::IdString& id, const pool<string> &data)
|
||||
{
|
||||
std::set<string> union_data = get_strpool_attribute(id);
|
||||
union_data.insert(data.begin(), data.end());
|
||||
if (!union_data.empty())
|
||||
set_strpool_attribute(id, union_data);
|
||||
}
|
||||
|
||||
std::set<string> RTLIL::AttrObject::get_strpool_attribute(const RTLIL::IdString &id) const
|
||||
{
|
||||
std::set<string> data;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue