summaryrefslogtreecommitdiff
path: root/gcc/c-objc-common.c
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-08 19:50:17 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-08 19:50:17 +0000
commitaea7e1dc8b9a2748875307788ea200043abd8eb9 (patch)
treeb5d1f5dae24cf0c3994f99d911989c25185e3b7d /gcc/c-objc-common.c
parentae0686dd0be55830a946743f0b35b260b5bf0f91 (diff)
downloadgcc-aea7e1dc8b9a2748875307788ea200043abd8eb9.tar.gz
* c-decl.c (static_ctors, static_dtors): Make static.
(pop_file_scope): Call c_common_write_pch and cgraph_finalize_compilation_unit here. (build_cdtor): Moved here from c-objc-common.c; simplify. (c_write_global_declarations_1): Clarify comment. (c_write_global_declarations): Close the external scope before doing anything else. Call build_cdtor, cgraph_optimize, and mudflap_finish_file here. * c-lang.c (finish_file): Don't call c_objc_common_finish_file. Clarify comment. * c-objc-common.c: No need to include cgraph.h. (build_cdtor): Moved to c-decl.c. (c_objc_common_finish_file): Delete. * c-tree.h: Update to match. * objc/objc-act.c (finish_file): Don't call c_objc_common_finish_file. (generate_static_references): Set TREE_USED before calling finish_decl. Eliminate unnecessary dummy declaration. Call rest_of_decl_compilation on the static_instances_decl. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84307 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-objc-common.c')
-rw-r--r--gcc/c-objc-common.c45
1 files changed, 0 insertions, 45 deletions
diff --git a/gcc/c-objc-common.c b/gcc/c-objc-common.c
index 1ede9c337a6..28da7e6afac 100644
--- a/gcc/c-objc-common.c
+++ b/gcc/c-objc-common.c
@@ -38,7 +38,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "langhooks.h"
#include "tree-mudflap.h"
#include "target.h"
-#include "cgraph.h"
static bool c_tree_printer (pretty_printer *, text_info *);
@@ -183,50 +182,6 @@ c_objc_common_init (void)
return true;
}
-/* 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 body;
-
- body = push_stmt_list ();
-
- for (; cdtors; cdtors = TREE_CHAIN (cdtors))
- add_stmt (build_function_call (TREE_VALUE (cdtors), NULL_TREE));
-
- body = pop_stmt_list (body);
-
- cgraph_build_static_cdtor (method_type, body);
-}
-
-/* Called at end of parsing, but before end-of-file processing. */
-
-void
-c_objc_common_finish_file (void)
-{
- if (pch_file)
- c_common_write_pch ();
-
- if (static_ctors)
- {
- build_cdtor ('I', static_ctors);
- static_ctors = 0;
- }
- if (static_dtors)
- {
- build_cdtor ('D', static_dtors);
- static_dtors = 0;
- }
-
- cgraph_finalize_compilation_unit ();
- cgraph_optimize ();
-
- if (flag_mudflap)
- mudflap_finish_file ();
-}
-
/* Called during diagnostic message formatting process to print a
source-level entity onto BUFFER. The meaning of the format specifiers
is as follows: