Remove make_cleanup_free_objfile

This replaces make_cleanup_free_objfile with std::unique_ptr.

gdb/ChangeLog
2017-11-04  Tom Tromey  <tom@tromey.com>

	* objfiles.c (do_free_objfile_cleanup): Remove.
	* compile/compile-object-load.c (compile_object_load): Update.
	* objfiles.h (make_cleanup_free_objfile): Remove.
This commit is contained in:
Tom Tromey 2017-11-01 18:51:15 -06:00
parent 7f6743fd09
commit ed2b3126d1
5 changed files with 19 additions and 24 deletions

View file

@ -729,18 +729,6 @@ objfile::~objfile ()
htab_delete (static_links);
}
static void
do_free_objfile_cleanup (void *obj)
{
delete (struct objfile *) obj;
}
struct cleanup *
make_cleanup_free_objfile (struct objfile *obj)
{
return make_cleanup (do_free_objfile_cleanup, obj);
}
/* Free all the object files at once and clean up their users. */
void