3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-11-05 13:56:04 +00:00

Make new_id/new_id_suffix taking string_view to avoid allocating strings

This commit is contained in:
Robert O'Callahan 2025-10-13 00:28:49 +00:00
parent 5cc3f27a5f
commit bf732df591
2 changed files with 8 additions and 8 deletions

View file

@ -271,8 +271,8 @@ extern int autoidx;
extern int yosys_xtrace;
extern bool yosys_write_versions;
RTLIL::IdString new_id(std::string file, int line, std::string func);
RTLIL::IdString new_id_suffix(std::string file, int line, std::string func, std::string suffix);
RTLIL::IdString new_id(std::string_view file, int line, std::string_view func);
RTLIL::IdString new_id_suffix(std::string_view file, int line, std::string_view func, std::string_view suffix);
#define NEW_ID \
YOSYS_NAMESPACE_PREFIX new_id(__FILE__, __LINE__, __FUNCTION__)