diff options
author | Jan Hubicka <jh@suse.cz> | 2003-06-23 23:11:44 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2003-06-23 21:11:44 +0000 |
commit | 1668aabc227d71870526e434415a6800cdeeba2f (patch) | |
tree | a308ac6242dd91f73480ea940c0237afcc47f134 /gcc/varasm.c | |
parent | 89ce1c8f763e1c3485d97d3c8c74f75f94bf0e09 (diff) | |
download | gcc-1668aabc227d71870526e434415a6800cdeeba2f.zip gcc-1668aabc227d71870526e434415a6800cdeeba2f.tar.gz gcc-1668aabc227d71870526e434415a6800cdeeba2f.tar.bz2 |
cgraph.c (cgraph_nodes_queue): Declare.
* cgraph.c (cgraph_nodes_queue): Declare.
(eq_node): Take identifier as p2.
(cgraph_node): Update htab_find_slot_with_hash call.
(cgraph_node_for_identifier): New.
(cgraph_mark_needed_node): Move here from cgraphunit.c.
* cgraph.h (cgraph_nodes_queue): Declare.
(cgraph_node_for_identifier): Declare.
* cgraphunit.c (cgraph_finalize_function): Collect entry points here
instead of in cgraph_finalize_compilation_unit; constructors and
destructors are entry points.
(cgraph_finalize_compilation_unit): Reorganize debug outout;
examine nested functions after lowerng; call collect_functions hook.
(cgraph_mark_local_functions): DECL_COMDAT functions are not local.
(cgraph_finalize_compilation_unit): Do not collect entry points.
* varasm.c: Include cgraph.h
(assemble_name): Mark referenced identifier as needed.
* cgraphunit.c (record_call_1): Use get_callee_fndecl.
From-SVN: r68390
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r-- | gcc/varasm.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index 091bbb3..a464e328 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -48,6 +48,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "tm_p.h" #include "debug.h" #include "target.h" +#include "cgraph.h" #ifdef XCOFF_DEBUGGING_INFO #include "xcoffout.h" /* Needed for external data @@ -1742,7 +1743,16 @@ assemble_name (file, name) id = maybe_get_identifier (real_name); if (id) - TREE_SYMBOL_REFERENCED (id) = 1; + { + if (!TREE_SYMBOL_REFERENCED (id) + && !cgraph_global_info_ready) + { + struct cgraph_node *node = cgraph_node_for_identifier (id); + if (node) + cgraph_mark_needed_node (node, 1); + } + TREE_SYMBOL_REFERENCED (id) = 1; + } if (name[0] == '*') fputs (&name[1], file); |