Remove unused `{find_,}enumeration_for_name()` methods

There are no users for the `NetScope::find_enumeration_for_name()` and
`Definitons::enumeration_for_name()` methods. Remove both of them.

The last user was removed in commit 61a088fa78 ("Use elaborate_type()
infrastructure to elaborate signal types").

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
Lars-Peter Clausen 2022-04-27 11:32:55 +02:00
parent f1e50e927b
commit 6a1bf00490
2 changed files with 0 additions and 44 deletions

View File

@ -76,17 +76,6 @@ netenum_t* Definitions::enumeration_for_key(const enum_type_t*key) const
return 0;
}
/*
* This locates the enumeration TYPE for the given enumeration literal.
*/
const netenum_t*Definitions::enumeration_for_name(perm_string name)
{
NetEConstEnum*tmp = enum_names_[name];
assert(tmp != 0);
return tmp->enumeration();
}
/*
* This locates the VALUE for the given enumeration literal.
*/
@ -272,31 +261,6 @@ NetScope*NetScope::find_typedef_scope(const Design*des, data_type_t*type)
return 0;
}
/*
* Look for the enumeration in the current scope and any parent scopes.
*/
const netenum_t*NetScope::find_enumeration_for_name(const Design*des, perm_string name)
{
NetScope *cur_scope = this;
while (cur_scope) {
NetEConstEnum*tmp = cur_scope->enum_names_[name];
if (tmp) break;
NetScope*import_scope = cur_scope->find_import(des, name);
if (import_scope)
cur_scope = import_scope;
else if (cur_scope == unit_)
return 0;
else
cur_scope = cur_scope->parent();
if (cur_scope == 0)
cur_scope = unit_;
}
assert(cur_scope);
return cur_scope->enum_names_[name]->enumeration();
}
/*
* Attach to the a parameter name in the scope a value and a type. The value
* (val_expr) is the PExpr form that is not yet elaborated. Later, when

View File

@ -886,10 +886,6 @@ class Definitions {
bool add_enumeration_name(netenum_t*enum_set, perm_string enum_name);
// Look up the enumeration literal in this scope. if the name
// is present, then return the enumeration type that declares it.
const netenum_t* enumeration_for_name(perm_string name);
// Look up the enumeration set that was added with the given
// key. This is used by enum_type_t::elaborate_type to locate
// a previously elaborated enumeration.
@ -949,10 +945,6 @@ class NetScope : public Definitions, public Attrib {
/* Search the scope hierarchy for the scope where 'type' was defined. */
NetScope*find_typedef_scope(const Design*des, data_type_t*type);
/* Routine to search for the enumeration given a name. It basically
* does what enumeration_for_name() does but searched the hierarchy. */
const netenum_t*find_enumeration_for_name(const Design*des, perm_string name);
/* Parameters exist within a scope, and these methods allow
one to manipulate the set. In these cases, the name is the
*simple* name of the parameter, the hierarchy is implicit in