aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/config/i386/winnt-cxx.c10
-rw-r--r--gcc/doc/generic.texi17
-rw-r--r--gcc/tree.def10
4 files changed, 23 insertions, 23 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4809a21..ef43c77 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+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.
diff --git a/gcc/config/i386/winnt-cxx.c b/gcc/config/i386/winnt-cxx.c
index d6bf0af..cf271d3 100644
--- a/gcc/config/i386/winnt-cxx.c
+++ b/gcc/config/i386/winnt-cxx.c
@@ -114,14 +114,11 @@ i386_pe_adjust_class_at_definition (tree t)
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);
@@ -132,7 +129,8 @@ i386_pe_adjust_class_at_definition (tree t)
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);
}
diff --git a/gcc/doc/generic.texi b/gcc/doc/generic.texi
index 8585216..874d464 100644
--- a/gcc/doc/generic.texi
+++ b/gcc/doc/generic.texi
@@ -2820,7 +2820,6 @@ This function cannot be used with namespaces that have
@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
@@ -2837,7 +2836,7 @@ macro to discern whether or not a particular type is a @code{class} as
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
@@ -2849,7 +2848,11 @@ list, if the enumeration type was declared in the class. (Of course,
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
@@ -2857,14 +2860,6 @@ 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
diff --git a/gcc/tree.def b/gcc/tree.def
index 0ec8059..9f80c4d 100644
--- a/gcc/tree.def
+++ b/gcc/tree.def
@@ -112,10 +112,7 @@ DEFTREECODE (BLOCK, "block", tcc_exceptional, 0)
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
@@ -213,8 +210,9 @@ DEFTREECODE (ARRAY_TYPE, "array_type", tcc_type, 0)
/* 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. */