vhdlpp: Fixed crash on unassociated generics.
This commit is contained in:
parent
807ad8002d
commit
295e4e7dfb
|
|
@ -92,7 +92,8 @@ int Entity::elaborate_generic_exprs_()
|
||||||
for (vector<InterfacePort*>::const_iterator cur = parms_.begin()
|
for (vector<InterfacePort*>::const_iterator cur = parms_.begin()
|
||||||
; cur != parms_.end() ; ++cur) {
|
; cur != parms_.end() ; ++cur) {
|
||||||
InterfacePort*curp = *cur;
|
InterfacePort*curp = *cur;
|
||||||
curp->expr->elaborate_expr(this, 0, curp->type);
|
if(curp->expr)
|
||||||
|
curp->expr->elaborate_expr(this, 0, curp->type);
|
||||||
}
|
}
|
||||||
return errors;
|
return errors;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,9 +50,11 @@ int Entity::emit(ostream&out)
|
||||||
const InterfacePort*curp = *cur;
|
const InterfacePort*curp = *cur;
|
||||||
if (cur != parms_.begin())
|
if (cur != parms_.begin())
|
||||||
out << ", ";
|
out << ", ";
|
||||||
out << "parameter \\" << curp->name << " = ";
|
out << "parameter \\" << curp->name << " ";
|
||||||
ivl_assert(*this, curp->expr);
|
if(curp->expr) {
|
||||||
errors += curp->expr->emit(out, this, 0);
|
out << "= ";
|
||||||
|
errors += curp->expr->emit(out, this, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
out << ") ";
|
out << ") ";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue