Add file/line comments to signal declarations

This commit is contained in:
Nick Gasson 2008-08-08 20:28:16 +01:00
parent eef1c968dc
commit 7ed8c0915d
1 changed files with 6 additions and 0 deletions

View File

@ -331,6 +331,12 @@ static void declare_signals(vhdl_entity *ent, ivl_scope_t scope)
case IVL_SIP_NONE:
{
vhdl_decl *decl = new vhdl_signal_decl(name.c_str(), sig_type);
ostringstream ss;
ss << "Declared at " << ivl_signal_file(sig) << ":"
<< ivl_signal_lineno(sig);
decl->set_comment(ss.str().c_str());
ent->get_arch()->get_scope()->add_decl(decl);
}
break;