diff options
author | Jan Hubicka <jh@suse.cz> | 2008-06-18 15:42:36 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2008-06-18 13:42:36 +0000 |
commit | f0c882ab6fcf7595b5d12203a9840202167d45f1 (patch) | |
tree | 0f7aeaefa2ec493bdcf33125095f31469d281db5 /gcc/cgraphunit.c | |
parent | ff2c88a5611bfb610de62937e762457124747d3c (diff) | |
download | gcc-f0c882ab6fcf7595b5d12203a9840202167d45f1.zip gcc-f0c882ab6fcf7595b5d12203a9840202167d45f1.tar.gz gcc-f0c882ab6fcf7595b5d12203a9840202167d45f1.tar.bz2 |
cgraph.h (cgraph_mark_if_needed): New function.
* cgraph.h (cgraph_mark_if_needed): New function.
* cgraphunit.c (cgraph_mark_if_needed): New function.
* c-decl.c (duplicate_decl): Use it.
From-SVN: r136893
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r-- | gcc/cgraphunit.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 7c0db40..dec2213 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -642,6 +642,18 @@ cgraph_finalize_function (tree decl, bool nested) do_warn_unused_parameter (decl); } +/* C99 extern inline keywords allow changing of declaration after function + has been finalized. We need to re-decide if we want to mark the function as + needed then. */ + +void +cgraph_mark_if_needed (tree decl) +{ + struct cgraph_node *node = cgraph_node (decl); + if (node->local.finalized && decide_is_function_needed (node, decl)) + cgraph_mark_needed_node (node); +} + /* Verify cgraph nodes of given cgraph node. */ void verify_cgraph_node (struct cgraph_node *node) |