diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2007-02-12 21:01:33 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2007-02-12 21:01:33 +0000 |
commit | 6170a99877476a4af173c3a6a27a69590457ab15 (patch) | |
tree | 7ba2251e6039eacb4bbf44e7e7ebd743914b4d81 /gcc/cgraphunit.c | |
parent | b9a8f075b650714eaa4a7f182302d8dc715dd50e (diff) | |
download | gcc-6170a99877476a4af173c3a6a27a69590457ab15.zip gcc-6170a99877476a4af173c3a6a27a69590457ab15.tar.gz gcc-6170a99877476a4af173c3a6a27a69590457ab15.tar.bz2 |
tree.h (DECL_IGNORED_P): Document further effect for FUNCTION_DECL.
* tree.h (DECL_IGNORED_P): Document further effect for FUNCTION_DECL.
* cgraphunit.c (cgraph_expand_function): If DECL_IGNORED_P is set on
the function, temporarily point the debug interface to the null one.
From-SVN: r121861
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r-- | gcc/cgraphunit.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 2d1ecda..f7274ee 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -984,6 +984,8 @@ cgraph_mark_functions_to_output (void) static void cgraph_expand_function (struct cgraph_node *node) { + enum debug_info_type save_write_symbols = NO_DEBUG; + const struct gcc_debug_hooks *save_debug_hooks = NULL; tree decl = node->decl; /* We ought to not compile any inline clones. */ @@ -994,6 +996,14 @@ cgraph_expand_function (struct cgraph_node *node) gcc_assert (node->lowered); + if (DECL_IGNORED_P (decl)) + { + save_write_symbols = write_symbols; + write_symbols = NO_DEBUG; + save_debug_hooks = debug_hooks; + debug_hooks = &do_nothing_debug_hooks; + } + /* Generate RTL for the body of DECL. */ lang_hooks.callgraph.expand_function (decl); @@ -1001,6 +1011,12 @@ cgraph_expand_function (struct cgraph_node *node) /* ??? Can happen with nested function of extern inline. */ gcc_assert (TREE_ASM_WRITTEN (node->decl)); + if (DECL_IGNORED_P (decl)) + { + write_symbols = save_write_symbols; + debug_hooks = save_debug_hooks; + } + current_function_decl = NULL; if (!cgraph_preserve_function_body_p (node->decl)) { |