* cgraph.h (release_function_body): Declare.
* tree.c (free_lang_data_in_decl): Free, parameters and return values
of unused delcarations.
From-SVN: r201413
+2013-08-01 Jan Hubicka <jh@suse.cz>
+
+ * cgraph.h (release_function_body): Declare.
+ * tree.c (free_lang_data_in_decl): Free, parameters and return values
+ of unused delcarations.
+
2013-08-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/arm/arm.md (minmax_arithsi_non_canon): Emit canonical RTL form
void cgraph_remove_edge (struct cgraph_edge *);
void cgraph_remove_node (struct cgraph_node *);
void cgraph_release_function_body (struct cgraph_node *);
+void release_function_body (tree);
void cgraph_node_remove_callees (struct cgraph_node *node);
struct cgraph_edge *cgraph_create_edge (struct cgraph_node *,
struct cgraph_node *,
if (TREE_CODE (decl) == FUNCTION_DECL)
{
+ struct cgraph_node *node;
+ if (!(node = cgraph_get_node (decl))
+ || (!node->symbol.definition && !node->clones))
+ {
+ if (node)
+ cgraph_release_function_body (node);
+ else
+ {
+ release_function_body (decl);
+ DECL_ARGUMENTS (decl) = NULL;
+ DECL_RESULT (decl) = NULL;
+ DECL_INITIAL (decl) = error_mark_node;
+ }
+ }
if (gimple_has_body_p (decl))
{
tree t;