This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFC Kill TYPE_METHODS
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: gcc-patches at gcc dot gnu dot org,Nathan Sidwell <nathan at acm dot org>,GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 03 Jul 2017 20:09:55 +0200
- Subject: Re: RFC Kill TYPE_METHODS
- Authentication-results: sourceware.org; auth=none
- References: <11eda108-71ee-0146-4940-3de15f721652@acm.org>
On July 3, 2017 7:49:32 PM GMT+02:00, Nathan Sidwell <nathan@acm.org> wrote:
>We currently have both TYPE_FIELDS and TYPE_METHODS for RECORD or UNION
>
>types.
>
>Originally TYPE_FIELDS held the FIELD_DECLS, but the C++ FE puts other
>kinds of things there -- TYPE_DECLs are a favourite. The C++ FE was
>the
>only user of TYPE_METHODS, which holds member functions. AFAICT it is
>still the only generator.
>
>Given that the common code iterating over TYPE_FIELDS must already
>check
>for non FIELD_DECL things, it seems superflous for the methods to be on
>
>a separate list. A quick grep shows ipa-devirt, c-ada-spec.c and debug
>
>emission to be the only non C++ FE things that would need a bit of
>cleanup.
>
>Having a single chain of member decls will simplify the C++ FE, as I
>try
>and merge its class member symbol handling.
>
>Any objections to going down this path?
Go ahead!
>nathan