Merge pull request #39 from orsonmmz/testenum_fix

Fixed enum typedefs.
This commit is contained in:
Stephen Williams 2014-08-29 21:06:20 -07:00
commit fe8e7a6261
4 changed files with 17 additions and 2 deletions

View File

@ -31,6 +31,9 @@ PScope::PScope(perm_string n)
PScope::~PScope()
{
for(map<perm_string, data_type_t*>::iterator it = typedefs.begin();
it != typedefs.end(); ++it)
delete it->second;
}
PWire* LexicalScope::wires_find(perm_string name)

View File

@ -1142,6 +1142,12 @@ int main(int argc, char*argv[])
(*idx).second = 0;
}
for(map<perm_string,data_type_t*>::iterator it = pform_typedefs.begin()
; it != pform_typedefs.end() ; ++it) {
delete (*it).second;
(*it).second = 0;
}
if (verbose_flag) {
if (times_flag) {
times(cycles+2);

View File

@ -1885,7 +1885,6 @@ static void pform_set_net_range(list<perm_string>*names,
}
delete names;
delete range;
}
/*

View File

@ -219,7 +219,14 @@ int VTypeDef::emit_decl(ostream&out, perm_string name, bool reg_flag) const
else
out << "wire ";
errors += type_->emit_def(out, name);
if(dynamic_cast<const VTypeArray*>(type_)) {
errors += type_->emit_def(out, name);
} else {
assert(name_ != empty_perm_string);
cout << "\\" << name_;
emit_name(out, name);
}
return errors;
}