From 7ed8c0915db77b41f7e21511a860d5e3fe540d44 Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Fri, 8 Aug 2008 20:28:16 +0100 Subject: [PATCH] Add file/line comments to signal declarations --- tgt-vhdl/scope.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tgt-vhdl/scope.cc b/tgt-vhdl/scope.cc index c52106561..b5c406463 100644 --- a/tgt-vhdl/scope.cc +++ b/tgt-vhdl/scope.cc @@ -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;