binutils-gdb/gdb/compile
Tom Tromey 9e86da0760 Change objfile to use new/delete
This changes objfiles to use new and delete rather than xmalloc and
free.  Simon noticed that it uses a non-POD and so shouldn't be
allocated with XCNEW; and I wanted to be able to use another non-POD as
a member; this patch is the result.

Regression tested by the buildbot.

2017-10-13  Tom Tromey  <tom@tromey.com>

	* compile/compile-object-run.c (do_module_cleanup): Use delete.
	* solib.c (update_solib_list, reload_shared_libraries_1): Use
	delete.
	* symfile.c (symbol_file_add_with_addrs): Use new.
	(symbol_file_add_separate): Update comment.
	(syms_from_objfile_1, remove_symbol_file_command): Use delete.
	* jit.c (jit_object_close_impl): Use new.
	(jit_unregister_code): Use delete.
	* objfiles.c (objfile::objfile): Rename from allocate_objfile.
	(~objfile): Rename from free_objfile.
	(free_objfile_separate_debug, do_free_objfile_cleanup)
	(free_all_objfiles, objfile_purge_solibs): Use delete.
	* objfiles.h (struct objfile): Add constructor and destructor.
	Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
	(allocate_objfile, free_objfile): Don't declare.
	(struct objstats): Add initializers.
2017-10-13 07:18:29 -06:00
..
compile-c-support.c Use std::string and unique_xmalloc_ptr in compile/ code 2017-09-03 13:03:10 -06:00
compile-c-symbols.c Stop assuming no-debug-info functions return int 2017-09-04 20:21:13 +01:00
compile-c-types.c Sync libiberty/ & include/ with GCC 2017-09-15 17:40:33 +01:00
compile-internal.h Use std::string and unique_xmalloc_ptr in compile/ code 2017-09-03 13:03:10 -06:00
compile-loc2c.c Use std::string and unique_xmalloc_ptr in compile/ code 2017-09-03 13:03:10 -06:00
compile-object-load.c Use gdb::unique_xmalloc_ptr when calling tilde_expand 2017-08-05 15:52:49 -06:00
compile-object-load.h update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
compile-object-run.c Change objfile to use new/delete 2017-10-13 07:18:29 -06:00
compile-object-run.h update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
compile.c Constify add_prefix_cmd 2017-10-11 16:21:02 -06:00
compile.h Eliminate make_cleanup_ui_file_delete / make ui_file a class hierarchy 2017-02-02 11:11:47 +00:00