mirror of
https://github.com/YosysHQ/yosys
synced 2026-01-17 07:56:26 +00:00
Give IdString a default move constructor and make it a POD type.
Now that we're not refcounting `IdString`, it can use the default move constructor. This lets us make `IdString` a POD type so it can be passed in registers in the standard C++ ABI.
This commit is contained in:
parent
d523c88c3c
commit
a6d696ba2b
1 changed files with 2 additions and 2 deletions
|
|
@ -223,8 +223,8 @@ struct RTLIL::IdString
|
|||
|
||||
constexpr inline IdString() : index_(0) { }
|
||||
inline IdString(const char *str) : index_(insert(std::string_view(str))) { }
|
||||
constexpr inline IdString(const IdString &str) : index_(str.index_) { }
|
||||
inline IdString(IdString &&str) : index_(str.index_) { str.index_ = 0; }
|
||||
constexpr IdString(const IdString &str) = default;
|
||||
IdString(IdString &&str) = default;
|
||||
inline IdString(const std::string &str) : index_(insert(std::string_view(str))) { }
|
||||
inline IdString(std::string_view str) : index_(insert(str)) { }
|
||||
constexpr inline IdString(StaticId id) : index_(static_cast<short>(id)) {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue