diff options
author | Jan Hubicka <jh@suse.cz> | 2003-02-26 12:09:33 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2003-02-26 11:09:33 +0000 |
commit | 0d446150c298b2048d18e354ee47b130ed3b8e7f (patch) | |
tree | ddc33e157eac05f7cef3bb3604e16a7dd67cba78 /gcc/objc/objc-act.c | |
parent | 9541e2e3d91f99cacd1cd724a956019281e760d5 (diff) | |
download | gcc-0d446150c298b2048d18e354ee47b130ed3b8e7f.zip gcc-0d446150c298b2048d18e354ee47b130ed3b8e7f.tar.gz gcc-0d446150c298b2048d18e354ee47b130ed3b8e7f.tar.bz2 |
objc-act.c: Include cgraph.h
* objc-act.c: Include cgraph.h
(mark_referenced_methods): New function.
(objc_init): Call it.
* objc-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Set.
* c-decl.c (finish_function): Honor can_defer_p even in unit-at-a-time
mode.
* optabs.c (expand_fix): Do not widen the input operand.
* expr.c (emit_group_store): Fix crash when converting single
register into complex register.
* Makefile.in (jump.o, regclass.o, alias.o): Add dependency on timevar.h
* alias.c: Include timevar.h
(init_alias_analysis): Set timevar
* jump.c: Include timevar.h
(rebuild_jump_labels): Set timevar
* regcalss.c: Include timevar.h
(reg_scan): Set timevar
* timevar.def (TV_ALIAS_ANALYSIS, TV_REG_SCAN, TV_REBUILD_JUMP): New
From-SVN: r63464
Diffstat (limited to 'gcc/objc/objc-act.c')
-rw-r--r-- | gcc/objc/objc-act.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index fb3b79f..3dace91 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -60,6 +60,7 @@ Boston, MA 02111-1307, USA. */ #include "debug.h" #include "target.h" #include "diagnostic.h" +#include "cgraph.h" /* This is the default way of generating a method name. */ /* I am not sure it is really correct. @@ -294,6 +295,7 @@ static void handle_class_ref PARAMS ((tree)); static void generate_struct_by_value_array PARAMS ((void)) ATTRIBUTE_NORETURN; static void encode_complete_bitfield PARAMS ((int, tree, int)); +static void mark_referenced_methods PARAMS ((void)); /*** Private Interface (data) ***/ @@ -486,6 +488,7 @@ objc_init (filename) void finish_file () { + mark_referenced_methods (); c_objc_common_finish_file (); /* Finalize Objective-C runtime data. No need to generate tables @@ -4028,6 +4031,29 @@ generate_dispatch_table (type, name, size, list) } static void +mark_referenced_methods () +{ + struct imp_entry *impent; + tree chain; + + for (impent = imp_list; impent; impent = impent->next) + { + chain = CLASS_CLS_METHODS (impent->imp_context); + while (chain) + { + cgraph_mark_needed_node (cgraph_node (METHOD_DEFINITION (chain))); + chain = TREE_CHAIN (chain); + } + chain = CLASS_NST_METHODS (impent->imp_context); + while (chain) + { + cgraph_mark_needed_node (cgraph_node (METHOD_DEFINITION (chain))); + chain = TREE_CHAIN (chain); + } + } +} + +static void generate_dispatch_tables () { tree initlist, chain, method_list_template; |