diff options
author | Richard Henderson <rth@redhat.com> | 2004-07-01 00:51:12 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2004-07-01 00:51:12 -0700 |
commit | c9b9aa64e97f8ad913c0bfb7897ac187b082d40c (patch) | |
tree | 9e2f01325bb00a9ea11c2b59b1144a6756a6aa5f /gcc/c-objc-common.c | |
parent | 276b3fab875aed7ef28e942a09017f795f1bb2c6 (diff) | |
download | gcc-c9b9aa64e97f8ad913c0bfb7897ac187b082d40c.zip gcc-c9b9aa64e97f8ad913c0bfb7897ac187b082d40c.tar.gz gcc-c9b9aa64e97f8ad913c0bfb7897ac187b082d40c.tar.bz2 |
cgraph.h (cgraph_build_static_cdtor): Declare.
* cgraph.h (cgraph_build_static_cdtor): Declare.
* cgraphunit.c (cgraph_build_static_cdtor): New.
* c-objc-common.c (build_cdtor): Use it.
* coverage.c (create_coverage): Likewise.
* libfuncs.h (LTI_gcov_init, gcov_init_libfunc): Remove.
* optabs.c (init_optabs): Don't set gcov_init_libfunc.
java/
* class.c (registerClass_libfunc): Remove.
(init_class_processing): Don't set it.
(emit_register_classes): Take list_p parameter. Fill it in
with _Jv_RegisterClass calls.
* decl.c (java_init_decl_processing): Don't call
init_resource_processing.
* jcf-parse.c (java_emit_static_constructor): New.
(java_parse_file): Call it.
* resource.c (registerResource_libfunc): Remove.
(init_resource_processing): Remove.
(write_resource_constructor): Take list_p parameter. Fill it in
with _Jv_RegisterResource calls.
* java-tree.h: Update prototypes.
From-SVN: r83958
Diffstat (limited to 'gcc/c-objc-common.c')
-rw-r--r-- | gcc/c-objc-common.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/gcc/c-objc-common.c b/gcc/c-objc-common.c index 731e063..293884a 100644 --- a/gcc/c-objc-common.c +++ b/gcc/c-objc-common.c @@ -184,27 +184,20 @@ c_objc_common_init (void) /* Synthesize a function which calls all the global ctors or global dtors in this file. */ + static void build_cdtor (int method_type, tree cdtors) { - tree fnname = get_file_function_name (method_type); - tree cs; - - start_function (void_list_node, - build_nt (CALL_EXPR, fnname, - tree_cons (NULL_TREE, NULL_TREE, void_list_node), - NULL_TREE), - NULL_TREE); - store_parm_decls (); + tree body; - cs = c_begin_compound_stmt (true); + body = push_stmt_list (); for (; cdtors; cdtors = TREE_CHAIN (cdtors)) - add_stmt (build_function_call (TREE_VALUE (cdtors), 0)); + add_stmt (build_function_call (TREE_VALUE (cdtors), NULL_TREE)); - add_stmt (c_end_compound_stmt (cs, true)); + body = pop_stmt_list (body); - finish_function (); + cgraph_build_static_cdtor (method_type, body); } /* Called at end of parsing, but before end-of-file processing. */ |