diff options
author | David Malcolm <dmalcolm@redhat.com> | 2013-10-24 02:10:10 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2013-10-24 02:10:10 +0000 |
commit | 18aa2b0407fcae29979103a8f9be4652c7d34193 (patch) | |
tree | 47f303b7d339aeffeb3949f863c13b6533cf2f60 /gcc/gengtype-state.c | |
parent | 2f3097a3e288ba16caa19a66e1a48f2f2ffc7a6c (diff) | |
download | gcc-18aa2b0407fcae29979103a8f9be4652c7d34193.tar.gz |
gengtype: parse base classes for some GTY-marked types
2013-10-23 David Malcolm <dmalcolm@redhat.com>
* gengtype-parse.c (require_without_advance): New.
(type): For GTY-marked types that are not GTY((user)), parse any
base classes, requiring them to be single-inheritance, and not
be templates. For non-GTY-marked types and GTY((user)),
continue to skip over any C++ inheritance specification.
* gengtype-state.c (state_writer::write_state_struct_type):
Write base class of type (if any).
(read_state_struct_type): Read base class of type (if any).
* gengtype.c (new_structure): Add a "base_class" parameter.
(create_optional_field_): Update for new parameter to
new_structure.
(adjust_field_rtx_def): Likewise.
(adjust_field_tree_exp): Likewise.
* gengtype.h (struct type): Add "base_class" field to the s
union field.
(new_structure): Add "base" parameter.
From-SVN: r204003
Diffstat (limited to 'gcc/gengtype-state.c')
-rw-r--r-- | gcc/gengtype-state.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/gengtype-state.c b/gcc/gengtype-state.c index 96ecc7cdaf8..1e9fadeb006 100644 --- a/gcc/gengtype-state.c +++ b/gcc/gengtype-state.c @@ -957,6 +957,7 @@ state_writer::write_state_struct_type (type_p current) { write_state_struct_union_type (current, "struct"); write_state_type (current->u.s.lang_struct); + write_state_type (current->u.s.base_class); } /* Write a GTY user-defined struct type. */ @@ -1613,6 +1614,7 @@ read_state_struct_type (type_p type) read_state_options (&(type->u.s.opt)); read_state_lang_bitmap (&(type->u.s.bitmap)); read_state_type (&(type->u.s.lang_struct)); + read_state_type (&(type->u.s.base_class)); } else { |