On 11/12/19 11:28 PM, Strager Neds wrote:
> symtab_node::set_section_for_node manages the reference count of
> section_hash_entry objects. I plan to add another function which needs
> to manage the reference count of these objects. To avoid duplicating
> code, factor the existing logic into reusable functions.
>
> This patch should not change behavior.
>
> Testing: Bootstrap on x86_64-linux-gnu with --disable-multilib
> --enable-checking=release --enable-languages=c,c++. Observe no change in
> test results.
>
> 2019-11-12  Matthew Glazar <strager....@gmail.com>
>
> * gcc/symtab.c (symtab_node::set_section_for_node): Extract reference
> counting logic into ...
> (retain_section_hash_entry): ... here (new function) and ...
> (release_section_hash_entry): ... here (new function).

I fixed some minor formatting problems, added function comments to the
factored-out code and re-tested this patch.  I'm pushing it to the trunk
momentarily.


jeff


Reply via email to