Add correct file/line information to signals

This patch adds a FILE_NAME function for signals to extract
the file/line information from the net's LineInfo, replacing
the dummy values.
This commit is contained in:
Nick Gasson 2008-08-08 20:35:27 +01:00 committed by Stephen Williams
parent 79e1273814
commit 6527262348
2 changed files with 7 additions and 2 deletions

View File

@ -2374,8 +2374,7 @@ void dll_target::signal(const NetNet*net)
object, or creating the sigs_ array if this is the first
signal. */
obj->scope_ = find_scope(des_, net->scope());
obj->file = perm_string::literal("N/A");
obj->lineno = 0;
FILE_NAME(obj, net);
assert(obj->scope_);
if (obj->scope_->nsigs_ == 0) {

View File

@ -771,4 +771,10 @@ static inline void FILE_NAME(ivl_process_t net, const LineInfo*info)
net->lineno = info->get_lineno();
}
static inline void FILE_NAME(ivl_signal_t net, const LineInfo*info)
{
net->file = info->get_file();
net->lineno = info->get_lineno();
}
#endif