Remove munmap_listp_free_cleanup
authorTom Tromey <tom@tromey.com>
Sat, 15 Sep 2018 20:45:51 +0000 (14:45 -0600)
committerTom Tromey <tom@tromey.com>
Tue, 18 Sep 2018 16:18:04 +0000 (10:18 -0600)
commitc9e0a7e333107ad140d9e15110f8820115921555
tree06ca98d31fb652e181a6d236f11365782aadbbcc
parent8ff71a9c80cfcf64c54d4ae938c644b1b1ea19fb
Remove munmap_listp_free_cleanup

This removes munmap_listp_free_cleanup, replacing it with a
std::unique_ptr at one spot and an explicit delete in another.  It
seemed simplest to completely change this data structure.

gdb/ChangeLog
2018-09-18  Tom Tromey  <tom@tromey.com>

* compile/compile-object-run.c (do_module_cleanup): Use delete.
* compile/compile-object-load.c (struct munmap_list): Move to
header file.
(munmap_list::add): Rename from munmap_list_add; rewrite.
(munmap_list::~munmap_list): Rename from munmap_list_free.
(munmap_listp_free_cleanup): Remove.
(compile_object_load): Update.
* compile/compile-object-load.h (struct munmap_list): Move from
compile-object-load.c.  Rewrite.
gdb/ChangeLog
gdb/compile/compile-object-load.c
gdb/compile/compile-object-load.h
gdb/compile/compile-object-run.c