vhdlpp: Corrected VTypeDef::emit_def() to allow typedefed names in function headers.
This commit is contained in:
parent
2ecfed0baa
commit
870a826225
|
|
@ -49,7 +49,8 @@ int Package::emit_package(ostream&fd) const
|
||||||
for (map<perm_string,const VType*>::const_iterator cur = cur_types_.begin()
|
for (map<perm_string,const VType*>::const_iterator cur = cur_types_.begin()
|
||||||
; cur != cur_types_.end() ; ++ cur) {
|
; cur != cur_types_.end() ; ++ cur) {
|
||||||
fd << "typedef ";
|
fd << "typedef ";
|
||||||
errors += cur->second->emit_def(fd, cur->first);
|
errors += cur->second->emit_def(fd,
|
||||||
|
dynamic_cast<const VTypeDef*>(cur->second) ? empty_perm_string : cur->first);
|
||||||
fd << " ;" << endl;
|
fd << " ;" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -209,10 +209,11 @@ int VTypeRecord::emit_def(ostream&out, perm_string name) const
|
||||||
* type. (We are defining a variable here, not the type itself.) The
|
* type. (We are defining a variable here, not the type itself.) The
|
||||||
* emit_typedef() method was presumably called to define type already.
|
* emit_typedef() method was presumably called to define type already.
|
||||||
*/
|
*/
|
||||||
int VTypeDef::emit_def(ostream&out, perm_string) const
|
int VTypeDef::emit_def(ostream&out, perm_string name) const
|
||||||
{
|
{
|
||||||
int errors = 0;
|
int errors = 0;
|
||||||
emit_name(out, name_);
|
emit_name(out, name_);
|
||||||
|
emit_name(out, name);
|
||||||
return errors;
|
return errors;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue