]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/gengtype.c
gengtype: Support explicit pointers in template arguments
authorDavid Malcolm <dmalcolm@redhat.com>
Tue, 13 May 2014 15:17:34 +0000 (15:17 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Tue, 13 May 2014 15:17:34 +0000 (15:17 +0000)
commit9aa54cc915d6ef589c805d87bb751d50c8eaed1b
tree8bffdaf2d5d6487778cb3b5ae5abfe405d0963d4
parent5c0f009c926cc78fb15f1c5cfa46071a4359c9e9
gengtype: Support explicit pointers in template arguments

gcc/
2014-05-13  David Malcolm  <dmalcolm@redhat.com>

* gengtype-parse.c (require3): Eliminate in favor of...
(require4): New.
(require_template_declaration): Update to support optional single *
on a type.

* gengtype.c (get_ultimate_base_class): Add a non-const overload.
(create_user_defined_type): Handle a single level of explicit
pointerness within template arguments.
(struct write_types_data): Add field "kind".
(filter_type_name): Handle "*" character.
(write_user_func_for_structure_ptr): Require a write_types_data
rather than just a prefix string, so that we can look up the kind
of the wtd and use it as an index into wrote_user_func_for_ptr,
ensuring that such functions are written at most once.  Support
subclasses by invoking the marking function of the ultimate base
class.
(write_user_func_for_structure_body): Require a write_types_data
rather than just a prefix string, so that we can pass this to
write_user_func_for_structure_ptr.
(write_func_for_structure): Likewise.
(ggc_wtd): Add initializer of new "kind" field.
(pch_wtd): Likewise.

* gengtype.h (enum write_types_kinds): New.
(struct type): Add field wrote_user_func_for_ptr to the "s"
union member.

From-SVN: r210379
gcc/ChangeLog
gcc/gengtype-parse.c
gcc/gengtype.c
gcc/gengtype.h