vhdlpp: Special handling for STRING type during type emission.

This commit is contained in:
Maciej Suminski 2015-09-22 14:34:47 +02:00
parent ba3c07a59a
commit 637d7c9633
1 changed files with 9 additions and 0 deletions

View File

@ -22,6 +22,7 @@
# include "vtype.h"
# include "expression.h"
# include "std_types.h"
# include <iostream>
# include <typeinfo>
# include <cassert>
@ -66,6 +67,14 @@ int VTypeArray::emit_def(ostream&out, perm_string name) const
if (base) {
assert(dimensions() == 1);
// If this is a string type without any boundaries specified, then
// there is a direct counterpart in SV called.. 'string'
if(this == &primitive_STRING) {
out << "string";
emit_name(out, name);
return errors;
}
base->emit_def(out, empty_perm_string);
if (signed_flag_)
out << " signed";