Clean up some debug dump formatting.

This commit is contained in:
Stephen Williams 2019-09-15 21:17:16 -07:00
parent a0ef6c4b62
commit b639c4c9aa
2 changed files with 9 additions and 1 deletions

View File

@ -1053,7 +1053,11 @@ void NetAlloc::dump(ostream&o, unsigned ind) const
void NetAssign_::dump_lval(ostream&o) const void NetAssign_::dump_lval(ostream&o) const
{ {
if (sig_) o << sig_->name(); if (sig_) o << sig_->name();
else if (nest_) nest_->dump_lval(o); else if (nest_) {
o << "(";
nest_->dump_lval(o);
o << ")";
}
else o << "<?>"; else o << "<?>";
if (! member_.nil()) { if (! member_.nil()) {

View File

@ -99,6 +99,10 @@ ostream& operator<< (ostream&out, const name_component_t&that)
ostream& operator<< (ostream&o, const pform_name_t&that) ostream& operator<< (ostream&o, const pform_name_t&that)
{ {
pform_name_t::const_iterator cur; pform_name_t::const_iterator cur;
if (that.size() == 0) {
o << "<nil>";
return o;
}
cur = that.begin(); cur = that.begin();
o << *cur; o << *cur;