aboutsummaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
authorRafael Avila de Espindola <espindola@google.com>2009-06-15 14:25:50 +0000
committerRafael Espindola <espindola@gcc.gnu.org>2009-06-15 14:25:50 +0000
commitfc26fae3db8a2eacc73224e2b3e0ab2aa3201eeb (patch)
tree8a727e22a197bff442c7fa013b41c3b723b12ef4 /gcc/varasm.c
parent144c91756250b14fb70ed94e72952868d2d6e84e (diff)
downloadgcc-fc26fae3db8a2eacc73224e2b3e0ab2aa3201eeb.zip
gcc-fc26fae3db8a2eacc73224e2b3e0ab2aa3201eeb.tar.gz
gcc-fc26fae3db8a2eacc73224e2b3e0ab2aa3201eeb.tar.bz2
cgraphunit.c (cgraph_function_versioning,save_inline_function_body): Use DECL_COMDAT_GROUP instead of DECL_ONE_ONLY.
2009-06-15 Rafael Avila de Espindola <espindola@google.com> * cgraphunit.c (cgraph_function_versioning,save_inline_function_body): Use DECL_COMDAT_GROUP instead of DECL_ONE_ONLY. * cgraph.c (cgraph_create_virtual_clone): Use DECL_COMDAT_GROUP. * config/i386/i386.c (ix86_file_end): Compute DECL_COMDAT_GROUP. * dwarf2asm.c(dw2_force_const_mem): Update call to make_decl_one_only. * langhooks-def.h (lhd_comdat_group, LANG_HOOKS_COMDAT_GROUP): Remove. (LANG_HOOKS_DECLS): Remove LANG_HOOKS_COMDAT_GROUP. * langhooks.c (lhd_comdat_group): Remove. * langhooks.h (lang_hooks_for_decls): Remove comdat_group. * tree.h (DECL_COMDAT_GROUP): New. (DECL_ONE_ONLY): Use DECL_COMDAT_GROUP. (tree_decl_with_vis): Add comdat_group. Remove one_only. (make_decl_one_only): Change signature. * varasm.c (get_emutls_init_templ_addr, emutls_decl): Update call to make_decl_one_only. (make_decl_one_only): Change signature. (default_elf_asm_named_section): Use DECL_COMDAT_GROUP. 2009-06-15 Rafael Avila de Espindola <espindola@google.com> * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Remove. * cp-tree.h (cxx_comdat_group): Change signature. * decl.c (duplicate_decls): Use DECL_COMDAT_GROUP. (cxx_comdat_group): Change signature. * decl2.c (comdat_linkage, maybe_make_one_only): Update call to make_decl_one_only. (constrain_visibility, get_guard): Use DECL_COMDAT_GROUP. * method.c (use_thunk): Update call to make_decl_one_only. * optimize.c (maybe_clone_body): Use DECL_COMDAT_GROUP 2009-06-15 Rafael Avila de Espindola <espindola@google.com> * g++.dg/abi/mangle11.C: Update warning line. * g++.dg/abi/mangle12.C: Update warning line. * g++.dg/abi/mangle17.C: Update warning line. * g++.dg/abi/mangle20-2.C: Update warning line. From-SVN: r148492
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 40a47fa..c749f95 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -328,7 +328,7 @@ get_emutls_init_templ_addr (tree decl)
DECL_WEAK (to) = DECL_WEAK (decl);
if (DECL_ONE_ONLY (decl))
{
- make_decl_one_only (to);
+ make_decl_one_only (to, DECL_ASSEMBLER_NAME (to));
TREE_STATIC (to) = TREE_STATIC (decl);
TREE_PUBLIC (to) = TREE_PUBLIC (decl);
DECL_VISIBILITY (to) = DECL_VISIBILITY (decl);
@@ -391,7 +391,7 @@ emutls_decl (tree decl)
TREE_READONLY (to) = 0;
SET_DECL_ASSEMBLER_NAME (to, DECL_NAME (to));
if (DECL_ONE_ONLY (decl))
- make_decl_one_only (to);
+ make_decl_one_only (to, DECL_ASSEMBLER_NAME (to));
DECL_CONTEXT (to) = DECL_CONTEXT (decl);
if (targetm.emutls.var_align_fixed)
/* If we're not allowed to change the proxy object's
@@ -5708,7 +5708,7 @@ supports_one_only (void)
translation units without generating a linker error. */
void
-make_decl_one_only (tree decl)
+make_decl_one_only (tree decl, tree comdat_group)
{
gcc_assert (TREE_CODE (decl) == VAR_DECL
|| TREE_CODE (decl) == FUNCTION_DECL);
@@ -5720,7 +5720,7 @@ make_decl_one_only (tree decl)
#ifdef MAKE_DECL_ONE_ONLY
MAKE_DECL_ONE_ONLY (decl);
#endif
- DECL_ONE_ONLY (decl) = 1;
+ DECL_COMDAT_GROUP (decl) = comdat_group;
}
else if (TREE_CODE (decl) == VAR_DECL
&& (DECL_INITIAL (decl) == 0 || DECL_INITIAL (decl) == error_mark_node))
@@ -5981,7 +5981,7 @@ default_elf_asm_named_section (const char *name, unsigned int flags,
fprintf (asm_out_file, ",%d", flags & SECTION_ENTSIZE);
if (HAVE_COMDAT_GROUP && (flags & SECTION_LINKONCE))
fprintf (asm_out_file, ",%s,comdat",
- lang_hooks.decls.comdat_group (decl));
+ IDENTIFIER_POINTER (DECL_COMDAT_GROUP (decl)));
}
putc ('\n', asm_out_file);