3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-10-26 01:14:37 +00:00

Merge pull request #5304 from rocallahan/idstring-stringf

Support `IdString` parameters in `stringf()` and remove `.c_str()` in a lot of places
This commit is contained in:
Jannis Harder 2025-09-08 20:29:20 +02:00 committed by GitHub
commit c468ee7add
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
92 changed files with 807 additions and 775 deletions

View file

@ -265,7 +265,7 @@ struct arg_map_t
// (something like macro_foobar_arg2). This doesn't include the leading backtick.
static std::string str_token(const std::string &macro_name, int pos)
{
return stringf("macro_%s_arg%d", macro_name.c_str(), pos);
return stringf("macro_%s_arg%d", macro_name, pos);
}
// Return definitions for the macro arguments (so that substituting in the macro body and

View file

@ -323,7 +323,7 @@
// create a unique name for the genvar
std::string old_str = decl->str;
std::string new_str = stringf("$genfordecl$%d$%s", autoidx++, old_str.c_str());
std::string new_str = stringf("$genfordecl$%d$%s", autoidx++, old_str);
// rename and move the genvar declaration to the containing description
decl->str = new_str;