diff options
author | Richard Henderson <rth@redhat.com> | 2001-08-06 17:13:35 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2001-08-06 17:13:35 -0700 |
commit | 47907859fdd0b39ecb2a78c068872470f823329f (patch) | |
tree | fe1d06a13ef40c7bd7f7953e66a94a01e57f7d54 /gcc/objc/objc-act.c | |
parent | 362b68a82dcf98169e852579a784dd4bddcccc25 (diff) | |
download | gcc-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/objc/objc-act.c')
-rw-r--r-- | gcc/objc/objc-act.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index 03c3ae4..67e4000 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -165,7 +165,7 @@ static void objc_post_options PARAMS ((void)); static void synth_module_prologue PARAMS ((void)); static tree build_constructor PARAMS ((tree, tree)); -static const char *build_module_descriptor PARAMS ((void)); +static rtx build_module_descriptor PARAMS ((void)); static tree init_module_descriptor PARAMS ((tree)); static tree build_objc_method_call PARAMS ((int, tree, tree, tree, tree, tree)); @@ -1836,13 +1836,12 @@ init_module_descriptor (type) /* Write out the data structures to describe Objective C classes defined. If appropriate, compile and output a setup function to initialize them. - Return a string which is the name of a function to call to initialize - the Objective C data structures for this file (and perhaps for other files - also). + Return a symbol_ref to the function to call to initialize the Objective C + data structures for this file (and perhaps for other files also). struct objc_module { ... } _OBJC_MODULE = { ... }; */ -static const char * +static rtx build_module_descriptor () { tree decl_specs, field_decl, field_decl_chain; @@ -1911,7 +1910,7 @@ build_module_descriptor () way of generating the requisite code. */ if (flag_next_runtime) - return 0; + return NULL_RTX; { tree parms, function_decl, decelerator, void_list_node_1; @@ -1967,8 +1966,7 @@ build_module_descriptor () function_decl = current_function_decl; finish_function (0); - /* Return the name of the constructor function. */ - return XSTR (XEXP (DECL_RTL (function_decl), 0), 0); + return XEXP (DECL_RTL (function_decl), 0); } } @@ -8361,9 +8359,9 @@ finish_objc () || meth_var_names_chain || meth_var_types_chain || sel_ref_chain) { /* Arrange for Objc data structures to be initialized at run time. */ - const char *init_name = build_module_descriptor (); - if (init_name) - assemble_constructor (init_name); + rtx init_sym = build_module_descriptor (); + if (init_sym) + assemble_constructor (init_sym, DEFAULT_INIT_PRIORITY); } /* Dump the class references. This forces the appropriate classes |