aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2020-10-01 12:36:46 -0700
committerNathan Sidwell <nathan@acm.org>2020-10-01 12:39:03 -0700
commitdfaa24c974bab4bc1bd3840d67ca1701acc0010c (patch)
tree9e88df5c5741a77887fbc7ffcbc5682837b2ee0e
parent2eb3c3daf6f5e2c09ade7a237749ba1f64a0a0a8 (diff)
downloadgcc-dfaa24c974bab4bc1bd3840d67ca1701acc0010c.zip
gcc-dfaa24c974bab4bc1bd3840d67ca1701acc0010c.tar.gz
gcc-dfaa24c974bab4bc1bd3840d67ca1701acc0010c.tar.bz2
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.
-rw-r--r--gcc/cp/cp-tree.h13
-rw-r--r--gcc/cp/tree.c12
2 files changed, 3 insertions, 22 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 48a4074..3ccd54c 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 0b80d8e..8b7c679 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;
}