Use new/delete for do_module_cleanup
authorTom Tromey <tom@tromey.com>
Wed, 23 Sep 2020 15:32:54 +0000 (09:32 -0600)
committerTom Tromey <tom@tromey.com>
Wed, 23 Sep 2020 15:32:55 +0000 (09:32 -0600)
commit0dbf6ee6a074208ef8f95ee3d2f7e4369265e456
tree3f47a6acb2a060b47a28b125409127d61cbc8967
parentebe824f5dcf96c8f70e07affb44c3a1679849e28
Use new/delete for do_module_cleanup

This changes do_module_cleanup to use new and delete.  It also removes
the use of the struct hack from this object -- this requires more
allocations for now, but this will be removed in a subsequent patch.

gdb/ChangeLog
2020-09-23  Tom Tromey  <tom@tromey.com>

* compile/compile-object-run.c (struct do_module_cleanup): Add
constructor, destructor.
<objfile_name_string>: Don't use struct hack.
(do_module_cleanup): Use delete.
(compile_object_run): Use new.
gdb/ChangeLog
gdb/compile/compile-object-run.c