diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-05-20 19:57:45 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-05-20 19:57:45 +0000 |
commit | b395f451e4885860674410cda8c8fb2d5fa51d20 (patch) | |
tree | c7cb5df0ad4b66323aabee83001d4e28934f6229 /gcc/symtab.c | |
parent | 089c9c49805ca3c1d1691f47f26f2a3758a01a88 (diff) | |
download | gcc-b395f451e4885860674410cda8c8fb2d5fa51d20.tar.gz |
* tree.h (DECL_ONE_ONLY): Return true only for externally visible
symbols.
* except.c (switch_to_exception_section, resolve_unique_section,
get_named_text_section, default_function_rodata_section,
align_variable, get_block_for_decl, default_section_type_flags):
Use DECL_COMDAT_GROUP instead of DECL_ONE_ONLY.
* symtab.c (symtab_add_to_same_comdat_group,
symtab_make_decl_local, fixup_same_cpp_alias_visibility,
symtab_nonoverwritable_alias, symtab_get_symbol_partitioning_class):
Likewise.
* cgraphclones.c (cgraph_create_virtual_clone): Likewise.
* bb-reorder.c (pass_partition_blocks::gate): Likewise.
* config/c6x/c6x.c (c6x_elf_unique_section): Likewise.
(c6x_function_in_section_p): Likewise.
* config/darwin.c (machopic_select_section): Likewise.
* config/arm/arm.c (arm_function_in_section_p): Likewise.
* config/mips/mips.c (mips_function_rodata_section): Likewise.
* config/mep/mep.c (mep_select_section): LIkewise.
* config/i386/i386.c (x86_64_elf_unique_section): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210654 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/symtab.c')
-rw-r--r-- | gcc/symtab.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/gcc/symtab.c b/gcc/symtab.c index 6b9b77abdfc..9d7c7e64b49 100644 --- a/gcc/symtab.c +++ b/gcc/symtab.c @@ -513,7 +513,7 @@ void symtab_add_to_same_comdat_group (symtab_node *new_node, symtab_node *old_node) { - gcc_assert (DECL_ONE_ONLY (old_node->decl)); + gcc_assert (DECL_COMDAT_GROUP (old_node->decl)); gcc_assert (!new_node->same_comdat_group); gcc_assert (new_node != old_node); @@ -832,9 +832,9 @@ verify_symtab_base (symtab_node *node) { symtab_node *n = node->same_comdat_group; - if (!DECL_ONE_ONLY (n->decl)) + if (!DECL_COMDAT_GROUP (n->decl)) { - error ("non-DECL_ONE_ONLY node in a same_comdat_group list"); + error ("node is in same_comdat_group list but has no DECL_COMDAT_GROUP"); error_found = true; } if (DECL_COMDAT_GROUP (n->decl) != DECL_COMDAT_GROUP (node->same_comdat_group->decl)) @@ -958,7 +958,7 @@ symtab_make_decl_local (tree decl) DECL_COMMON (decl) = 0; else gcc_assert (TREE_CODE (decl) == FUNCTION_DECL); - if (DECL_ONE_ONLY (decl) || DECL_COMDAT (decl)) + if (DECL_COMDAT_GROUP (decl) || DECL_COMDAT (decl)) { DECL_SECTION_NAME (decl) = 0; DECL_COMDAT (decl) = 0; @@ -1101,7 +1101,7 @@ fixup_same_cpp_alias_visibility (symtab_node *node, symtab_node *target) DECL_COMDAT (node->decl) = DECL_COMDAT (target->decl); DECL_COMDAT_GROUP (node->decl) = DECL_COMDAT_GROUP (target->decl); - if (DECL_ONE_ONLY (target->decl) + if (DECL_COMDAT_GROUP (target->decl) && !node->same_comdat_group) symtab_add_to_same_comdat_group (node, target); } @@ -1231,7 +1231,7 @@ symtab_nonoverwritable_alias (symtab_node *node) /* Update the properties. */ DECL_EXTERNAL (new_decl) = 0; - if (DECL_ONE_ONLY (node->decl)) + if (DECL_COMDAT_GROUP (node->decl)) DECL_SECTION_NAME (new_decl) = NULL; DECL_COMDAT_GROUP (new_decl) = 0; TREE_PUBLIC (new_decl) = 0; @@ -1328,8 +1328,7 @@ symtab_get_symbol_partitioning_class (symtab_node *node) return SYMBOL_EXTERNAL; /* Linker discardable symbols are duplicated to every use unless they are - keyed. - Keyed symbols or those. */ + keyed. */ if (DECL_ONE_ONLY (node->decl) && !node->force_output && !node->forced_by_abi |