aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraph.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2010-07-08 16:20:23 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2010-07-08 14:20:23 +0000
commit5dde3b0174313d39691008d01204b59223a54496 (patch)
treeb48a07adef9b35b2300676942bad2b110175cd69 /gcc/cgraph.c
parentcf8ca1a9b7377c4d20fc394adb70733baad5aa19 (diff)
downloadgcc-5dde3b0174313d39691008d01204b59223a54496.zip
gcc-5dde3b0174313d39691008d01204b59223a54496.tar.gz
gcc-5dde3b0174313d39691008d01204b59223a54496.tar.bz2
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
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r--gcc/cgraph.c13
1 files changed, 7 insertions, 6 deletions
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;