From ddc204391ee0829bd6b182cec193488b567a454b Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 24 Apr 2015 17:01:11 +0200 Subject: [PATCH] vhdlpp: Add 'sub' prefix for subtypes while emitting packages. --- vhdlpp/package.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vhdlpp/package.cc b/vhdlpp/package.cc index df8f60c41..167c8a279 100644 --- a/vhdlpp/package.cc +++ b/vhdlpp/package.cc @@ -74,6 +74,9 @@ void Package::write_to_stream(ostream&fd) const if (is_global_type(cur->first)) continue; + if(!dynamic_cast(cur->second)) + fd << "sub"; + fd << "type " << cur->first << " is "; cur->second->write_type_to_stream(fd); fd << "; -- imported" << endl; @@ -85,6 +88,9 @@ void Package::write_to_stream(ostream&fd) const if (is_global_type(cur->first)) continue; + if(!dynamic_cast(cur->second)) + fd << "sub"; + fd << "type " << cur->first << " is "; cur->second->write_type_to_stream(fd); fd << ";" << endl;