From 150fe088a65dd1dee3ded1580b1e05f27fc62d6d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 25 Aug 2014 16:55:26 +0200 Subject: [PATCH] vhdlpp: VTypeRecord is marked as acceptable in packed arrays. VTypeDef is accepted depending on the base type. --- vhdlpp/vtype.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vhdlpp/vtype.h b/vhdlpp/vtype.h index ed264e762..d8c5f6b9a 100644 --- a/vhdlpp/vtype.h +++ b/vhdlpp/vtype.h @@ -270,6 +270,8 @@ class VTypeRecord : public VType { void show(std::ostream&) const; int emit_def(std::ostream&out, perm_string name) const; + bool can_be_packed() const { return true; } + const element_t* element_by_name(perm_string name) const; private: @@ -298,6 +300,8 @@ class VTypeDef : public VType { int emit_typedef(std::ostream&out, typedef_context_t&ctx) const; int emit_def(std::ostream&out, perm_string name) const; + + bool can_be_packed() const { return type_->can_be_packed(); } private: int emit_decl(std::ostream&out, perm_string name, bool reg_flag) const;