+2007-02-12 Eric Botcazou <ebotcazou@adacore.com>
+
+ * 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.
+
2007-02-12 Eric Botcazou <ebotcazou@adacore.com>
* dwarf2out.c (round_up_to_align): New static function.
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. */
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);
/* ??? 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))
{
(DECL_COMMON_CHECK (NODE)->decl_common.debug_expr_is_from)
/* Nonzero for a given ..._DECL node means that the name of this node should
- be ignored for symbolic debug purposes. */
+ be ignored for symbolic debug purposes. Moreover, for a FUNCTION_DECL,
+ the body of the function should also be ignored. */
#define DECL_IGNORED_P(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.ignored_flag)
/* Nonzero for a given ..._DECL node means that this node represents an