vhdlpp: Minor change to ScopeBase::find_constant().

This commit is contained in:
Maciej Suminski 2015-02-19 17:01:14 +01:00
parent 5884879b02
commit cd55f30a27
1 changed files with 5 additions and 0 deletions

View File

@ -106,6 +106,9 @@ const VType*ScopeBase::find_type(perm_string by_name)
bool ScopeBase::find_constant(perm_string by_name, const VType*&typ, Expression*&exp) const
{
typ = NULL;
exp = NULL;
map<perm_string,struct const_t*>::const_iterator cur = cur_constants_.find(by_name);
if (cur == cur_constants_.end()) {
cur = use_constants_.find(by_name);
@ -121,6 +124,8 @@ bool ScopeBase::find_constant(perm_string by_name, const VType*&typ, Expression*
exp = cur->second->val;
return true;
}
return false;
}
Signal* ScopeBase::find_signal(perm_string by_name) const