From d70f132792bcd02d3de8262eb20a861fccdc7d94 Mon Sep 17 00:00:00 2001 From: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com> Date: Wed, 3 Sep 2025 03:32:01 +1200 Subject: [PATCH] wrapcell.cc: Avoid format name collision --- passes/cmds/wrapcell.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/passes/cmds/wrapcell.cc b/passes/cmds/wrapcell.cc index 0c15848e4..39a183e23 100644 --- a/passes/cmds/wrapcell.cc +++ b/passes/cmds/wrapcell.cc @@ -47,7 +47,7 @@ struct ContextData { std::string unused_outputs; }; -std::optional format(std::string fmt, const dict ¶meters, +std::optional format_with_params(std::string fmt, const dict ¶meters, const ContextData &context) { std::stringstream result; @@ -230,7 +230,7 @@ struct WrapcellPass : Pass { context.unused_outputs += "_" + RTLIL::unescape_id(chunk.format(cell)); } - std::optional unescaped_name = format(name_fmt, cell->parameters, context); + std::optional unescaped_name = format_with_params(name_fmt, cell->parameters, context); if (!unescaped_name) log_error("Formatting error when processing cell '%s' in module '%s'\n", log_id(cell), log_id(module)); @@ -270,7 +270,7 @@ struct WrapcellPass : Pass { if (rule.value_fmt.empty()) { subm->set_bool_attribute(rule.name); } else { - std::optional value = format(rule.value_fmt, cell->parameters, context); + std::optional value = format_with_params(rule.value_fmt, cell->parameters, context); if (!value) log_error("Formatting error when processing cell '%s' in module '%s'\n",