From: Nathan Sidwell Date: Thu, 1 Oct 2020 19:36:46 +0000 (-0700) Subject: c++: Kill DECL_HIDDEN_P X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dfaa24c974bab4bc1bd3840d67ca1701acc0010c;p=gcc.git c++: Kill DECL_HIDDEN_P There are only a couple of asserts remaining using this macro, and nothing using TYPE_HIDDEN_P. Killed thusly. gcc/cp/ * cp-tree.h (DECL_ANTICIPATED): Adjust comment. (DECL_HIDDEN_P, TYPE_HIDDEN_P): Delete. * tree.c (ovl_insert): Delete DECL_HIDDEN_P assert. (ovl_skip_hidden): Likewise. --- diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 48a4074b370..3ccd54ce24b 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -4045,22 +4045,11 @@ more_aggr_init_expr_args_p (const aggr_init_expr_arg_iterator *iter) /* Nonzero if NODE is a DECL which we know about but which has not been explicitly declared, such as a built-in function or a friend - declared inside a class. In the latter case DECL_HIDDEN_FRIEND_P - will be set. */ + declared inside a class. */ #define DECL_ANTICIPATED(NODE) \ (DECL_LANG_SPECIFIC (TYPE_FUNCTION_OR_TEMPLATE_DECL_CHECK (NODE)) \ ->u.base.anticipated_p) -/* Is DECL NODE a hidden name? */ -#define DECL_HIDDEN_P(NODE) \ - (DECL_LANG_SPECIFIC (NODE) && TYPE_FUNCTION_OR_TEMPLATE_DECL_P (NODE) \ - && DECL_ANTICIPATED (NODE)) - -/* True if this is a hidden class type. */ -#define TYPE_HIDDEN_P(NODE) \ - (DECL_LANG_SPECIFIC (TYPE_NAME (NODE)) \ - && DECL_ANTICIPATED (TYPE_NAME (NODE))) - /* True for artificial decls added for OpenMP privatized non-static data members. */ #define DECL_OMP_PRIVATIZED_MEMBER(NODE) \ diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 0b80d8ed408..8b7c6798ee9 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -2261,8 +2261,6 @@ ovl_insert (tree fn, tree maybe_ovl, int using_or_hidden) { maybe_ovl = ovl_make (fn, maybe_ovl); - gcc_checking_assert ((using_or_hidden < 0) == DECL_HIDDEN_P (fn)); - if (using_or_hidden < 0) OVL_HIDDEN_P (maybe_ovl) = true; if (using_or_hidden > 0) @@ -2287,14 +2285,8 @@ ovl_insert (tree fn, tree maybe_ovl, int using_or_hidden) tree ovl_skip_hidden (tree ovl) { - for (; - ovl && TREE_CODE (ovl) == OVERLOAD && OVL_HIDDEN_P (ovl); - ovl = OVL_CHAIN (ovl)) - gcc_checking_assert (DECL_HIDDEN_P (OVL_FUNCTION (ovl))); - - /* We should not see a naked hidden decl. */ - gcc_checking_assert (!(ovl && TREE_CODE (ovl) != OVERLOAD - && DECL_HIDDEN_P (ovl))); + while (ovl && TREE_CODE (ovl) == OVERLOAD && OVL_HIDDEN_P (ovl)) + ovl = OVL_CHAIN (ovl); return ovl; }