mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-15 05:41:49 +08:00
Remove make_cleanup_value_free
This removes make_cleanup_value_free, in favor of a unique_ptr specialization. Regression tested by the buildbot. gdb/ChangeLog 2017-10-08 Tom Tromey <tom@tromey.com> * utils.h (make_cleanup_value_free): Remove. * utils.c (do_value_free, struct cleanup): Remove. * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>: Use gdb_value_up. * value.h (struct value_deleter): New. (gdb_value_up): New typedef.
This commit is contained in:
16
gdb/utils.c
16
gdb/utils.c
@ -185,22 +185,6 @@ make_cleanup_value_free_to_mark (struct value *mark)
|
||||
return make_cleanup (do_value_free_to_mark, mark);
|
||||
}
|
||||
|
||||
/* Helper for make_cleanup_value_free. */
|
||||
|
||||
static void
|
||||
do_value_free (void *value)
|
||||
{
|
||||
value_free ((struct value *) value);
|
||||
}
|
||||
|
||||
/* Free VALUE. */
|
||||
|
||||
struct cleanup *
|
||||
make_cleanup_value_free (struct value *value)
|
||||
{
|
||||
return make_cleanup (do_value_free, value);
|
||||
}
|
||||
|
||||
/* This function is useful for cleanups.
|
||||
Do
|
||||
|
||||
|
Reference in New Issue
Block a user