diff --git a/vhdlpp/parse.y b/vhdlpp/parse.y index 5bd0e3977..95853a03a 100644 --- a/vhdlpp/parse.y +++ b/vhdlpp/parse.y @@ -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 */ diff --git a/vhdlpp/scope.h b/vhdlpp/scope.h index df1f1daba..a95d1e4cd 100644 --- a/vhdlpp/scope.h +++ b/vhdlpp/scope.h @@ -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::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; }