From 5d5cd66f11e3ece08b4b4f34be9e77ff49a5f11a Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 11 Dec 2002 10:28:26 -0800 Subject: [PATCH] tree.h (MODULE_LOCAL_P): Kill. * tree.h (MODULE_LOCAL_P): Kill. * varasm.c (default_binds_local_p_1): Use decl_visibility instead. From-SVN: r60040 --- gcc/ChangeLog | 5 +++++ gcc/tree.h | 5 ----- gcc/varasm.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index caf1f4bce78..9a8c41acd65 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-12-11 Richard Henderson + + * tree.h (MODULE_LOCAL_P): Kill. + * varasm.c (default_binds_local_p_1): Use decl_visibility instead. + 2002-12-11 Kazu Hirata * config/h8300/h8300.md (two define_peephole2): New. diff --git a/gcc/tree.h b/gcc/tree.h index a675851003b..1dda21c81d7 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -2402,11 +2402,6 @@ extern tree merge_attributes PARAMS ((tree, tree)); extern tree merge_dllimport_decl_attributes PARAMS ((tree, tree)); #endif -/* Return true if DECL will be always resolved to a symbol defined in the - same module (shared library or program). */ -#define MODULE_LOCAL_P(DECL) \ - (lookup_attribute ("visibility", DECL_ATTRIBUTES (DECL)) != NULL) - /* Return a version of the TYPE, qualified as indicated by the TYPE_QUALS, if one exists. If no qualified version exists yet, return NULL_TREE. */ diff --git a/gcc/varasm.c b/gcc/varasm.c index f8b33d080a6..8b321af8296 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -5417,7 +5417,7 @@ default_binds_local_p_1 (exp, shlib) else if (! TREE_PUBLIC (exp)) local_p = true; /* A variable is local if the user tells us so. */ - else if (MODULE_LOCAL_P (exp)) + else if (decl_visibility (exp) != VISIBILITY_DEFAULT) local_p = true; /* Otherwise, variables defined outside this object may not be local. */ else if (DECL_EXTERNAL (exp)) -- 2.30.2