aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraph.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2014-06-16 17:02:34 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2014-06-16 15:02:34 +0000
commitda66d5964324bd5a3ce782f46a7d5e30137b5c20 (patch)
treefcdfc3d0c661e959702bf48ed72c7a09f4b9f923 /gcc/cgraph.c
parent9e9f6bf0079f1a8ff965efe7d971a1b636f36fbc (diff)
downloadgcc-da66d5964324bd5a3ce782f46a7d5e30137b5c20.zip
gcc-da66d5964324bd5a3ce782f46a7d5e30137b5c20.tar.gz
gcc-da66d5964324bd5a3ce782f46a7d5e30137b5c20.tar.bz2
revert: symtab.c (symtab_node::reset_section): New method.
Revert: * symtab.c (symtab_node::reset_section): New method. * cgraph.c (cgraph_node_cannot_be_local_p_1): Accept non-local for localization. * cgraph.h (reset_section): Declare. * ipa-inline-analysis.c (do_estimate_growth): Check for comdat groups; do not consider comdat locals. * cgraphclones.c (set_new_clone_decl_and_node_flags): Get section for new symbol. * ipa-visiblity.c (cgraph_externally_visible_p): Cleanup. (update_visibility_by_resolution_info): Consider UNDEF; fix checking; reset sections of symbols dragged out of the comdats. (function_and_variable_visibility): Reset sections of localized symbols. From-SVN: r211710
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r--gcc/cgraph.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index f535740..610bf67 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -2169,7 +2169,6 @@ cgraph_node_cannot_be_local_p_1 (struct cgraph_node *node,
&& !node->forced_by_abi
&& !symtab_used_from_object_file_p (node)
&& !node->same_comdat_group)
- || DECL_EXTERNAL (node->decl)
|| !node->externally_visible));
}
@@ -2260,14 +2259,14 @@ cgraph_make_node_local_1 (struct cgraph_node *node, void *data ATTRIBUTE_UNUSED)
{
symtab_make_decl_local (node->decl);
+ node->set_section (NULL);
node->set_comdat_group (NULL);
node->externally_visible = false;
node->forced_by_abi = false;
node->local.local = true;
- node->reset_section ();
+ node->set_section (NULL);
node->unique_name = (node->resolution == LDPR_PREVAILING_DEF_IRONLY
- || node->unique_name
- || node->resolution == LDPR_PREVAILING_DEF_IRONLY_EXP);
+ || node->resolution == LDPR_PREVAILING_DEF_IRONLY_EXP);
node->resolution = LDPR_PREVAILING_DEF_IRONLY;
gcc_assert (cgraph_function_body_availability (node) == AVAIL_LOCAL);
}