Pass file and line number information for expression constants.

This patch passes the file and line number information for
constants that are used in expressions.
This commit is contained in:
Cary R 2008-09-05 14:44:02 -07:00 committed by Stephen Williams
parent 38970fea65
commit 5bf55485d5
1 changed files with 2 additions and 0 deletions

View File

@ -219,6 +219,7 @@ void dll_target::expr_const(const NetEConst*net)
expr_ = (ivl_expr_t)calloc(1, sizeof(struct ivl_expr_s)); expr_ = (ivl_expr_t)calloc(1, sizeof(struct ivl_expr_s));
assert(expr_); assert(expr_);
expr_->value_= net->expr_type(); expr_->value_= net->expr_type();
FILE_NAME(expr_, net);
if (net->value().is_string()) { if (net->value().is_string()) {
expr_->type_ = IVL_EX_STRING; expr_->type_ = IVL_EX_STRING;
@ -276,6 +277,7 @@ void dll_target::expr_creal(const NetECReal*net)
expr_->width_ = net->expr_width(); expr_->width_ = net->expr_width();
expr_->signed_ = 1; expr_->signed_ = 1;
expr_->type_ = IVL_EX_REALNUM; expr_->type_ = IVL_EX_REALNUM;
FILE_NAME(expr_, net);
expr_->value_= IVL_VT_REAL; expr_->value_= IVL_VT_REAL;
expr_->u_.real_.value = net->value().as_double(); expr_->u_.real_.value = net->value().as_double();
} }