This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC Kill TYPE_METHODS


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]