summaryrefslogtreecommitdiff
path: root/gcc/c-objc-common.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-01 07:51:12 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-01 07:51:12 +0000
commitb553055975ca3366d1c5aba3744b461e513bbee2 (patch)
tree9e2f01325bb00a9ea11c2b59b1144a6756a6aa5f /gcc/c-objc-common.c
parentae39fb4112dfc99628ad4049fdd708e9734598f9 (diff)
downloadgcc-b553055975ca3366d1c5aba3744b461e513bbee2.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83958 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-objc-common.c')
-rw-r--r--gcc/c-objc-common.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/gcc/c-objc-common.c b/gcc/c-objc-common.c
index 731e0631264..293884af7f6 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. */