aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2001-08-06 17:13:35 -0700
committerRichard Henderson <rth@gcc.gnu.org>2001-08-06 17:13:35 -0700
commit47907859fdd0b39ecb2a78c068872470f823329f (patch)
treefe1d06a13ef40c7bd7f7953e66a94a01e57f7d54 /gcc/cp
parent362b68a82dcf98169e852579a784dd4bddcccc25 (diff)
downloadgcc-47907859fdd0b39ecb2a78c068872470f823329f.zip
gcc-47907859fdd0b39ecb2a78c068872470f823329f.tar.gz
gcc-47907859fdd0b39ecb2a78c068872470f823329f.tar.bz2
varasm.c (assemble_constructor): Take a symbol_ref and a priority instead of a bare string.
* varasm.c (assemble_constructor): Take a symbol_ref and a priority instead of a bare string. Move priority handling here from cp/decl2.c. * output.h: Update decls. * c-decl.c (c_expand_body): Update calls to assemble_constructor and assemble_destructor. * profile.c (output_func_start_profiler): Likewise. * objc/objc-act.c (finish_objc): Likewise. (build_module_descriptor): Return the symbol not the symbol name. * ch/grant.c (chill_finish_compile): Pass a symbol_ref and priority to assemble_constructor. * cp/decl2.c (finish_objects): Pass a symbol_ref and priority to assemble_{constructor,destructor}. Remove priority handling. * java/class.c (emit_register_classes): Pass a symbol_ref and priority to assemble_constructor. From-SVN: r44678
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/decl2.c32
2 files changed, 11 insertions, 26 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 470fd82..1b3cceb 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2001-08-06 Richard Henderson <rth@redhat.com>
+
+ * decl2.c (finish_objects): Pass a symbol_ref and priority to
+ assemble_{constructor,destructor}. Remove priority handling.
+
2001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
Don't allow template-id in using-declaration.
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index d35ab71..be02224 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -2839,8 +2839,8 @@ finish_objects (method_type, initp, body)
int method_type, initp;
tree body;
{
- const char *fnname;
tree fn;
+ rtx fnsym;
/* Finish up. */
finish_compound_stmt (/*has_no_scope=*/0, body);
@@ -2853,31 +2853,11 @@ finish_objects (method_type, initp, body)
if (flag_syntax_only)
return;
- fnname = XSTR (XEXP (DECL_RTL (fn), 0), 0);
- if (initp == DEFAULT_INIT_PRIORITY)
- {
- if (method_type == 'I')
- assemble_constructor (fnname);
- else
- assemble_destructor (fnname);
- }
-#if defined (ASM_OUTPUT_CONSTRUCTOR)
- /* If we're using init priority we can't use assemble_*tor, but on ELF
- targets we can stick the references into named sections for GNU ld
- to collect. */
- else if (targetm.have_named_sections)
- {
- char buf[15];
- sprintf (buf, ".%ctors.%.5u", method_type == 'I' ? 'c' : 'd',
- /* invert the numbering so the linker puts us in the proper
- order; constructors are run from right to left, and the
- linker sorts in increasing order. */
- MAX_INIT_PRIORITY - initp);
- named_section (NULL_TREE, buf, 0);
- assemble_integer (XEXP (DECL_RTL (fn), 0),
- POINTER_SIZE / BITS_PER_UNIT, 1);
- }
-#endif
+ fnsym = XEXP (DECL_RTL (fn), 0);
+ if (method_type == 'I')
+ assemble_constructor (fnsym, initp);
+ else
+ assemble_destructor (fnsym, initp);
}
/* The names of the parameters to the function created to handle