diff options
author | Matt Austern <austern@apple.com> | 2003-11-06 22:08:26 +0000 |
---|---|---|
committer | Matt Austern <austern@gcc.gnu.org> | 2003-11-06 22:08:26 +0000 |
commit | 968b41a1662526b8b3eb5861f7fb369450ff9644 (patch) | |
tree | c4ffb9b377ba06be592c6688dd70529152203fd4 /gcc/cp | |
parent | 63e292b7ec0ae980f7ffa763448c81a923a72321 (diff) | |
download | gcc-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')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/decl.c | 1 | ||||
-rw-r--r-- | gcc/cp/method.c | 1 | ||||
-rw-r--r-- | gcc/cp/optimize.c | 1 |
4 files changed, 9 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index a9656c1..7f83578 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2003-11-06 Matt Austern <austern@apple.com> + + * decl.c (duplicate_decls): copy DECL_VISIBILITY field. + * method.c (use_thunk): give thunk same visibility as function. + * optimize.c (maybe_clone_body): copy DECL_VISIBILITY field. + 2003-11-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> PR c++/11616 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) diff --git a/gcc/cp/method.c b/gcc/cp/method.c index c6651e8..61aebd4 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -383,6 +383,7 @@ use_thunk (tree thunk_fndecl, bool emit_p) /* The linkage of the function may have changed. FIXME in linkage rewrite. */ TREE_PUBLIC (thunk_fndecl) = TREE_PUBLIC (function); + DECL_VISIBILITY (thunk_fndecl) = DECL_VISIBILITY (function); if (flag_syntax_only) { diff --git a/gcc/cp/optimize.c b/gcc/cp/optimize.c index 2b7df6c..7dc57ce 100644 --- a/gcc/cp/optimize.c +++ b/gcc/cp/optimize.c @@ -158,6 +158,7 @@ maybe_clone_body (tree fn) DECL_INTERFACE_KNOWN (clone) = DECL_INTERFACE_KNOWN (fn); DECL_NOT_REALLY_EXTERN (clone) = DECL_NOT_REALLY_EXTERN (fn); TREE_PUBLIC (clone) = TREE_PUBLIC (fn); + DECL_VISIBILITY (clone) = DECL_VISIBILITY (fn); /* Adjust the parameter names and locations. */ parm = DECL_ARGUMENTS (fn); |