summaryrefslogtreecommitdiff
path: root/gcc/cgraph.c
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2013-08-30 10:24:49 +0200
committerMarek Polacek <polacek@redhat.com>2013-08-30 10:24:49 +0200
commit1a986fd51aa96fbd0d66f4d52739356374912563 (patch)
treef5310553e69c8a35180556d9af7e66bdecac7f92 /gcc/cgraph.c
parent61fb959b676db6ca9ef0da335dfef0d8ec08e113 (diff)
parentf85c9de6ba5165bc1b941ceb09e4e8ffb1c7eb0f (diff)
downloadgcc-ubsan.tar.gz
Merge branch 'master' of git+ssh://gcc.gnu.org/git/gcc into ubsanubsan
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r--gcc/cgraph.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index 063c5245fef..feb17bb0dd9 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -1663,6 +1663,8 @@ cgraph_release_function_body (struct cgraph_node *node)
if (!node->used_as_abstract_origin && DECL_INITIAL (node->symbol.decl))
DECL_INITIAL (node->symbol.decl) = error_mark_node;
release_function_body (node->symbol.decl);
+ if (node->symbol.lto_file_data)
+ lto_free_function_in_decl_state_for_node ((symtab_node) node);
}
/* Remove the node from cgraph. */
@@ -3107,10 +3109,11 @@ cgraph_get_body (struct cgraph_node *node)
gcc_assert (DECL_STRUCT_FUNCTION (decl) == NULL);
- lto_input_function_body (file_data, decl, data);
+ lto_input_function_body (file_data, node->symbol.decl, data);
lto_stats.num_function_bodies++;
lto_free_section_data (file_data, LTO_section_function_body, name,
data, len);
+ lto_free_function_in_decl_state_for_node ((symtab_node) node);
return true;
}