PR jit/63854: Fix leak of ipa hooks
authorDavid Malcolm <dmalcolm@redhat.com>
Thu, 4 Dec 2014 21:11:04 +0000 (21:11 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Thu, 4 Dec 2014 21:11:04 +0000 (21:11 +0000)
commit953971cf7dd11ab68caec04cae767f5dde656b23
tree66c55eb5136f95f1adbef64e69d922fc0b3b6a35
parentef9f382ca52a80bb8575d73d7cc8d3ddbf5f7ad7
PR jit/63854: Fix leak of ipa hooks

gcc/ChangeLog:
PR jit/63854
* ipa-prop.c (ipa_register_cgraph_hooks): Guard insertion of
ipa_add_new_function on function_insertion_hook_holder being
non-NULL.
* ipa-reference.c (ipa_reference_c_finalize): Remove
node_removal_hook_holder and node_duplication_hook_holder if
they've been added to symtab.
* toplev.c (toplev::finalize): Call ipa_reference_c_finalize
before cgraph_c_finalize so that the former can access "symtab".

From-SVN: r218403
gcc/ChangeLog
gcc/ipa-prop.c
gcc/ipa-reference.c
gcc/toplev.c