+2017-07-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR bootstrap/81521
+ * tree.def: Remove TYPE_METHODS documentation, adjust TYPE_FIELDS
+ documentation.
+ * doc/generic.texi: Likewise.
+ * config/i386/winnt-cxx.c (i386_pe_adjust_class_at_definition): Look
+ for FUNCTION_DECLs in TYPE_FIELDS rather than TYPE_METHODS.
+
2017-07-24 Jackson Woodruff <jackson.woodruff@arm.com>
* config/aarch64/aarch64-simd.md (aarch64_mla_elt_merge<mode>): New.
decl_attributes (&ti_decl, na, 0);
}
- /* Check static VAR_DECL's. */
+ /* Check FUNCTION_DECL's and static VAR_DECL's. */
for (member = TYPE_FIELDS (t); member; member = DECL_CHAIN (member))
if (TREE_CODE (member) == VAR_DECL)
maybe_add_dllexport (member);
-
- /* Check FUNCTION_DECL's. */
- for (member = TYPE_METHODS (t); member; member = DECL_CHAIN (member))
- if (TREE_CODE (member) == FUNCTION_DECL)
+ else if (TREE_CODE (member) == FUNCTION_DECL)
{
tree thunk;
maybe_add_dllexport (member);
maybe_add_dllexport (thunk);
}
/* Check vtables */
- for (member = CLASSTYPE_VTABLES (t); member; member = DECL_CHAIN (member))
+ for (member = CLASSTYPE_VTABLES (t);
+ member; member = DECL_CHAIN (member))
if (TREE_CODE (member) == VAR_DECL)
maybe_add_dllexport (member);
}
@findex BINFO_TYPE
@findex TYPE_FIELDS
@findex TYPE_VFIELD
-@findex TYPE_METHODS
Besides namespaces, the other high-level scoping construct in C++ is the
class. (Throughout this manual the term @dfn{class} is used to mean the
opposed to a @code{struct}. This macro will be true only for classes
declared with the @code{class} tag.
-Almost all non-function members are available on the @code{TYPE_FIELDS}
+Almost all members are available on the @code{TYPE_FIELDS}
list. Given one member, the next can be found by following the
@code{TREE_CHAIN}. You should not depend in any way on the order in
which fields appear on this list. All nodes on this list will be
the @code{TYPE_DECL} for the enumeration type will appear here as well.)
There are no entries for base classes on this list. In particular,
there is no @code{FIELD_DECL} for the ``base-class portion'' of an
-object.
+object. If a function member is overloaded, each of the overloaded
+functions appears; no @code{OVERLOAD} nodes appear on the @code{TYPE_FIELDS}
+list. Implicitly declared functions (including default constructors,
+copy constructors, assignment operators, and destructors) will appear on
+this list as well.
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_VFIELD} just like all the entries on the @code{TYPE_FIELDS}
list.
-The function members are available on the @code{TYPE_METHODS} list.
-Again, subsequent members are found by following the @code{TREE_CHAIN}
-field. If a function is overloaded, each of the overloaded functions
-appears; no @code{OVERLOAD} nodes appear on the @code{TYPE_METHODS}
-list. Implicitly declared functions (including default constructors,
-copy constructors, assignment operators, and destructors) will appear on
-this list as well.
-
Every class has an associated @dfn{binfo}, which can be obtained with
@code{TYPE_BINFO}. Binfos are used to represent base-classes. The
binfo given by @code{TYPE_BINFO} is the degenerate case, whereby every
itself or have named members doesn't really have a "scope" per se.
The TYPE_STUB_DECL field is used as a forward-references to names for
ENUMERAL_TYPE, RECORD_TYPE, UNION_TYPE, and QUAL_UNION_TYPE nodes;
- see below.
- The TYPE_METHODS points to list of all methods associated with the type.
- It is non-NULL only at main variant of the type and after free_lang_data
- it may be set to error_mark_node instead of actual list to save memory. */
+ see below. */
/* The ordering of the following codes is optimized for the checking
macros in tree.h. Changing the order will degrade the speed of the
/* Struct in C, or record in Pascal. */
/* Special fields:
TYPE_FIELDS chain of FIELD_DECLs for the fields of the struct,
- and VAR_DECLs, TYPE_DECLs and CONST_DECLs for record-scope variables,
- types and enumerators.
+ VAR_DECLs, TYPE_DECLs and CONST_DECLs for record-scope variables,
+ types and enumerators and FUNCTION_DECLs for methods associated
+ with the type.
A few may need to be added for Pascal. */
/* See the comment above, before ENUMERAL_TYPE, for how
forward references to struct tags are handled in C. */