Constify scope reference in NetEConstParam and NetECRealParam

Parameter expressions need to remember the scope they have been declared in
so that the code generator backends can insert the right parameter
reference, rather than a constant value.

Currently the scope is stored as a non-const reference. But that is not
needed. Mark the scope reference as const so NetEConstParam and
NetECRealParam can be created when only a const scope reference is
available.

Signed-off-by: Lars-Peter Clausen <[email protected]>
This commit is contained in:
Lars-Peter Clausen
2022-02-19 13:00:12 +01:00
parent 892622bf64
commit ad23b08a10
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -304,7 +304,7 @@ ivl_variable_type_t NetECReal::expr_type() const
return IVL_VT_REAL;
}
NetECRealParam::NetECRealParam(NetScope*s, perm_string n, const verireal&v)
NetECRealParam::NetECRealParam(const NetScope*s, perm_string n, const verireal&v)
: NetECReal(v), scope_(s), name_(n)
{
}