From 5dde3b0174313d39691008d01204b59223a54496 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Thu, 8 Jul 2010 16:20:23 +0200 Subject: ipa.c: Include pointer-set.h * ipa.c: Include pointer-set.h (cgraph_externally_visible_p): New attribute ALIASED; when in LTO, hidden symbols are local unless they are aliased. (function_and_variable_visibility): Compute aliased nodes; handle LTO and hidden symbol on functions and vars. * cgraph.c (cgraph_make_decl_local): Clear NAMED_SECTION for COMDAT symbols; handle COMDAT_GROUPS also at vars. From-SVN: r161957 --- gcc/cgraph.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'gcc/cgraph.c') diff --git a/gcc/cgraph.c b/gcc/cgraph.c index 3736769..33653df 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -2455,15 +2455,16 @@ cgraph_make_decl_local (tree decl) if (TREE_CODE (decl) == VAR_DECL) DECL_COMMON (decl) = 0; - else if (TREE_CODE (decl) == FUNCTION_DECL) + else gcc_assert (TREE_CODE (decl) == FUNCTION_DECL); + + if (DECL_COMDAT (decl)) { + DECL_SECTION_NAME (decl) = 0; DECL_COMDAT (decl) = 0; - DECL_COMDAT_GROUP (decl) = 0; - DECL_WEAK (decl) = 0; - DECL_EXTERNAL (decl) = 0; } - else - gcc_unreachable (); + DECL_COMDAT_GROUP (decl) = 0; + DECL_WEAK (decl) = 0; + DECL_EXTERNAL (decl) = 0; TREE_PUBLIC (decl) = 0; if (!DECL_RTL_SET_P (decl)) return; -- cgit v1.1