aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl.c
diff options
context:
space:
mode:
authorMatt Austern <austern@apple.com>2003-11-06 22:08:26 +0000
committerMatt Austern <austern@gcc.gnu.org>2003-11-06 22:08:26 +0000
commit968b41a1662526b8b3eb5861f7fb369450ff9644 (patch)
treec4ffb9b377ba06be592c6688dd70529152203fd4 /gcc/cp/decl.c
parent63e292b7ec0ae980f7ffa763448c81a923a72321 (diff)
downloadgcc-968b41a1662526b8b3eb5861f7fb369450ff9644.zip
gcc-968b41a1662526b8b3eb5861f7fb369450ff9644.tar.gz
gcc-968b41a1662526b8b3eb5861f7fb369450ff9644.tar.bz2
c-common.c (handle_visibility_attribute): Set DECL_VISIBILITY field instead of hanging an attribute object off the decl.
* c-common.c (handle_visibility_attribute): Set DECL_VISIBILITY field instead of hanging an attribute object off the decl. * tree.h (DECL_VISIBLITY): New accessor macro for symbol_visibility field in struct tree_decl. (enum symbol_visibility): Move definition to before tree_decl. (struct tree_decl): Define new two-bit field, symbol_visibility. (decl_visibility): Remove declaration. * varasm.c (maybe_assemble_visibility): Use DECL_VISIBILITY instead of decl_visibility. (default_binds_local_p_1): Use DECL_VISIBILITY instead of decl_visibility. (decl_visibility): Remove. * cp/decl.c (duplicate_decls): copy DECL_VISIBILITY field. * cp/method.c (use_thunk): give thunk same visibility as function. * cp/optimize.c (maybe_clone_body): copy DECL_VISIBILITY field. From-SVN: r73320
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r--gcc/cp/decl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 2bd6ff3..0f7a8bc 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -1850,6 +1850,7 @@ duplicate_decls (tree newdecl, tree olddecl)
TREE_ADDRESSABLE (newdecl) = TREE_ADDRESSABLE (olddecl);
TREE_ASM_WRITTEN (newdecl) = TREE_ASM_WRITTEN (olddecl);
DECL_COMMON (newdecl) = DECL_COMMON (olddecl);
+ DECL_VISIBILITY (newdecl) = DECL_VISIBILITY (olddecl);
COPY_DECL_ASSEMBLER_NAME (olddecl, newdecl);
if (TREE_CODE (newdecl) == FUNCTION_DECL)