This is the mail archive of the gcc@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: TYPE_VFIELD documentation


Richard Kenner wrote:
    The @code{TYPE_VFIELD} is a compiler-generated field used to point to
    virtual function tables.  It may or may not appear on the
    @code{TYPE_FIELDS} list.  However, back ends should handle the
    @code{TYPE_VFIELD} just like all the entries on the @code{TYPE_FIELDS}
    list.

Just a quick glance at the C++ front end turns up the function create_vtable_ptr in the file cp/class.c.


So the TYPE_VFIELD is a FIELD_DECL, and this FIELD_DECL may not be on the TYPE_FIELDS list. Grepping through the main sources show that the only places that use it are dbxout.c and dwarf2out.c, and they treat it just like a singular FIELD_DECL, so emit debug info for it.

Note also that the C front end re-uses TYPE_VFIELD for its own purposes, so this doesn't apply.

You should be able to do the same thing with TYPE_METHOD to learn more about it.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



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