From ed2b3126d1828d55d57880c6b6045a4e58c05cde Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 1 Nov 2017 18:51:15 -0600 Subject: Remove make_cleanup_free_objfile This replaces make_cleanup_free_objfile with std::unique_ptr. gdb/ChangeLog 2017-11-04 Tom Tromey * objfiles.c (do_free_objfile_cleanup): Remove. * compile/compile-object-load.c (compile_object_load): Update. * objfiles.h (make_cleanup_free_objfile): Remove. --- gdb/objfiles.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'gdb/objfiles.c') diff --git a/gdb/objfiles.c b/gdb/objfiles.c index d8fe88b..edde399 100644 --- a/gdb/objfiles.c +++ b/gdb/objfiles.c @@ -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 -- cgit v1.1