Skip to content

Commit

Permalink
Verilog: clarify signature of verilog_typecheckt::check_module_ports
Browse files Browse the repository at this point in the history
This method only takes the ports as input, not the full module source.
  • Loading branch information
kroening committed Jan 28, 2024
1 parent 0acb673 commit 54d941d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/verilog/verilog_interfaces.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void verilog_typecheckt::module_interface(
interface_module_item(module_item);

// Check the typing of the ports
check_module_ports(module_source);
check_module_ports(module_source.ports());
}

/*******************************************************************\
Expand All @@ -51,10 +51,8 @@ Function: verilog_typecheckt::check_module_ports
\*******************************************************************/

void verilog_typecheckt::check_module_ports(
const verilog_module_sourcet &module_source)
const verilog_module_sourcet::port_listt &module_ports)
{
const auto &module_ports = module_source.ports();

auto &ports = module_symbol.type.add(ID_ports).get_sub();
ports.resize(module_ports.size());
std::map<irep_idt, unsigned> port_names;
Expand Down
2 changes: 1 addition & 1 deletion src/verilog/verilog_typecheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class verilog_typecheckt:

// interfaces
void module_interface(const verilog_module_sourcet &);
void check_module_ports(const verilog_module_sourcet &);
void check_module_ports(const verilog_module_sourcet::port_listt &);
void interface_module_decl(const class verilog_declt &);
void interface_function_or_task_decl(const class verilog_declt &);
void interface_inst(const verilog_inst_baset &);
Expand Down

0 comments on commit 54d941d

Please sign in to comment.