From 766a20a0a70084f71935bb3361bb23bbbc244f93 Mon Sep 17 00:00:00 2001 From: "Emil J. Tywoniak" Date: Wed, 15 Jul 2026 11:32:07 +0200 Subject: [PATCH] const2ast: handle constant parsing from the command-line again --- frontends/verilog/const2ast.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontends/verilog/const2ast.cc b/frontends/verilog/const2ast.cc index 573af336b..43d36cf2f 100644 --- a/frontends/verilog/const2ast.cc +++ b/frontends/verilog/const2ast.cc @@ -45,11 +45,13 @@ using namespace AST; using namespace VERILOG_FRONTEND; void ConstParser::log_maybe_loc_error(std::string msg) { - log_file_error(*loc.begin.filename, loc.begin.line, "%s", msg); + log_file_error(loc.begin.filename ? loc.begin.filename->c_str() : "INTERNAL", + loc.begin.line, "%s", msg); } void ConstParser::log_maybe_loc_warn(std::string msg) { - log_file_warning(*loc.begin.filename, loc.begin.line, "%s", msg); + log_file_warning(loc.begin.filename ? loc.begin.filename->c_str() : "INTERNAL", + loc.begin.line, "%s", msg); } // divide an arbitrary length decimal number by two and return the rest