diff options
author | Jan Hubicka <jh@suse.cz> | 2004-09-08 11:28:06 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2004-09-08 09:28:06 +0000 |
commit | 89480522221ee99f08da1abd7197b5b7c978d5c0 (patch) | |
tree | 29b2c1082d2d4dda08ca1f0a6b2e0aa510db37c2 /gcc/cgraphunit.c | |
parent | 323e3709b9ccdd514ac4ce2e2ba7e934984591b1 (diff) | |
download | gcc-89480522221ee99f08da1abd7197b5b7c978d5c0.zip gcc-89480522221ee99f08da1abd7197b5b7c978d5c0.tar.gz gcc-89480522221ee99f08da1abd7197b5b7c978d5c0.tar.bz2 |
cgraph.c (cgraph_remove_node): Free DECL_INITIAL field of node.
* cgraph.c (cgraph_remove_node): Free DECL_INITIAL field of node.
* cgraphunit.c (verify_cgraph): Don't verify on syntax errors.
(cgraph_expand_function): Remove stale cgraph edges of currently
compiled function; fix non-unit-at-a-time code copying function
node for later reuse.
From-SVN: r87181
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r-- | gcc/cgraphunit.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index a045457..81df309 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -610,6 +610,9 @@ verify_cgraph (void) { struct cgraph_node *node; + if (sorrycount || errorcount) + return; + for (node = cgraph_nodes; node; node = node->next) verify_cgraph_node (node); } @@ -800,12 +803,15 @@ cgraph_expand_function (struct cgraph_node *node) gcc_assert (TREE_ASM_WRITTEN (node->decl)); current_function_decl = NULL; - if (DECL_SAVED_TREE (node->decl) - && !cgraph_preserve_function_body_p (node->decl)) + if (!cgraph_preserve_function_body_p (node->decl)) { DECL_SAVED_TREE (node->decl) = NULL; DECL_STRUCT_FUNCTION (node->decl) = NULL; DECL_INITIAL (node->decl) = error_mark_node; + /* Elliminate all call edges. This is important so the call_expr no longer + points to the dead function body. */ + while (node->callees) + cgraph_remove_edge (node->callees); } } |