vhdlpp: Removed redundant ActiveScope::bind_name() for subprograms.

This commit is contained in:
Maciej Suminski 2016-01-26 16:43:14 +01:00
parent 8298c96dee
commit cc729e8dd9
2 changed files with 2 additions and 9 deletions

View File

@ -2578,7 +2578,7 @@ subprogram_body /* IEEE 1076-2008 P4.3 */
body->set_statements($4);
prog->set_body(body);
active_scope->bind_name(prog->name(), prog);
active_scope->bind_subprogram(prog->name(), prog);
active_sub = NULL;
}
@ -2596,7 +2596,7 @@ subprogram_body /* IEEE 1076-2008 P4.3 */
subprogram_declaration
: subprogram_specification ';'
{ if ($1) active_scope->bind_name($1->name(), $1); }
{ if ($1) active_scope->bind_subprogram($1->name(), $1); }
;
subprogram_declarative_item /* IEEE 1079-2008 P4.3 */

View File

@ -240,13 +240,6 @@ class ActiveScope : public ScopeBase {
cur_constants_[name] = new const_t(obj, val);
}
inline void bind_name(perm_string name, SubprogramHeader*obj)
{ map<perm_string, SubprogramHeader*>::iterator it;
if((it = use_subprograms_.find(name)) != use_subprograms_.end() )
use_subprograms_.erase(it);
cur_subprograms_[name] = obj;
}
void bind(Entity*ent)
{ context_entity_ = ent; }