Return unique_xmalloc_ptr for generate_c_for_variable_locations
authorKeith Seitz <keiths@redhat.com>
Fri, 10 Aug 2018 17:38:56 +0000 (10:38 -0700)
committerKeith Seitz <keiths@redhat.com>
Fri, 10 Aug 2018 18:14:25 +0000 (11:14 -0700)
commitbd923e510884a92514a4f9d90d79592d248d5d92
tree95c8395b4e3c64552a5f6d6cbf9ca9db08e592a4
parentd7f449c026181e14162a67407842462e4bc0d8bd
Return unique_xmalloc_ptr for generate_c_for_variable_locations

This patch eliminates two cleanups in compile/ by changing
generate_c_for_variable_locations so that it returns a unique_ptr.

gdb/ChangeLog:
        * compile/compile-c-support.c (c_compute_program): Use
        unique_xmalloc_ptr to eliminate cleanup.
        * compile/compile-c-symbols.c (generate_c_for_variable_locations):
        Return a unique_xmalloc_ptr and eliminate cleanup.
        * compile/compile-internal.h (generate_c_for_variable_locations):
        Return unique_xmalloc_ptr and update description.
gdb/ChangeLog
gdb/compile/compile-c-support.c
gdb/compile/compile-c-symbols.c
gdb/compile/compile-internal.h