diff options
| author | Martin Jambor <mjambor@suse.cz> | 2011-04-29 00:49:46 +0200 |
|---|---|---|
| committer | Martin Jambor <jamborm@gcc.gnu.org> | 2011-04-29 00:49:46 +0200 |
| commit | 85ad2ef57fb2c016b0944e2d685e0c57a8018671 (patch) | |
| tree | 26c22ad7602a23bc16258ff654830655fd733322 /gcc/cgraphunit.c | |
| parent | 74c810bdd01ab0b60037927982a4cee6c2c86416 (diff) | |
| download | gcc-85ad2ef57fb2c016b0944e2d685e0c57a8018671.zip gcc-85ad2ef57fb2c016b0944e2d685e0c57a8018671.tar.gz gcc-85ad2ef57fb2c016b0944e2d685e0c57a8018671.tar.bz2 | |
cgraphunit.c (cgraph_preserve_function_body_p): Accept a cgraph node instead of a decl.
2011-04-29 Martin Jambor <mjambor@suse.cz>
* cgraphunit.c (cgraph_preserve_function_body_p): Accept a cgraph
node instead of a decl. Update all callers.
* cgraph.h: Update declaration.
From-SVN: r173138
Diffstat (limited to 'gcc/cgraphunit.c')
| -rw-r--r-- | gcc/cgraphunit.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index aa2f2a1..70b63b3 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -1580,7 +1580,7 @@ cgraph_expand_function (struct cgraph_node *node) /* Make sure that BE didn't give up on compiling. */ gcc_assert (TREE_ASM_WRITTEN (decl)); current_function_decl = NULL; - gcc_assert (!cgraph_preserve_function_body_p (decl)); + gcc_assert (!cgraph_preserve_function_body_p (node)); cgraph_release_function_body (node); /* Eliminate all call edges. This is important so the GIMPLE_CALL no longer points to the dead function body. */ @@ -1758,13 +1758,12 @@ cgraph_output_in_order (void) /* Return true when function body of DECL still needs to be kept around for later re-use. */ bool -cgraph_preserve_function_body_p (tree decl) +cgraph_preserve_function_body_p (struct cgraph_node *node) { - struct cgraph_node *node; - gcc_assert (cgraph_global_info_ready); + gcc_assert (!node->same_body_alias); + /* Look if there is any clone around. */ - node = cgraph_get_node (decl); if (node->clones) return true; return false; |
