3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-02-21 15:57:36 +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 committed by Emil J. Tywoniak
parent b3f3f42577
commit 9577a028c8
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__)