3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-07-19 19:02:04 +00:00

ast, read_verilog: unify location types, reduce filename copying

This commit is contained in:
Emil J. Tywoniak 2025-06-18 22:50:46 +02:00
parent b276fb6616
commit 81e5270484
12 changed files with 715 additions and 693 deletions

View file

@ -5704,7 +5704,7 @@ bool RTLIL::SigSpec::parse(RTLIL::SigSpec &sig, RTLIL::Module *module, std::stri
{
cover("kernel.rtlil.sigspec.parse");
AST::current_filename = "input";
// AST::current_filename = "input";
std::vector<std::string> tokens;
sigspec_parse_split(tokens, str, ',');
@ -5720,7 +5720,7 @@ bool RTLIL::SigSpec::parse(RTLIL::SigSpec &sig, RTLIL::Module *module, std::stri
if (('0' <= netname[0] && netname[0] <= '9') || netname[0] == '\'') {
cover("kernel.rtlil.sigspec.parse.const");
VERILOG_FRONTEND::ConstParser p;
VERILOG_FRONTEND::ConstParser p{location()};
auto ast = p.const2ast(netname);
if (ast == nullptr)
return false;