Change value::contents to be a unique_xmalloc_ptr
authorTom Tromey <tom@tromey.com>
Wed, 4 Apr 2018 22:34:33 +0000 (16:34 -0600)
committerTom Tromey <tom@tromey.com>
Fri, 6 Apr 2018 21:44:51 +0000 (15:44 -0600)
commit14c88955a138c24577e703d11f4d25c44a64d0be
tree6c1b275b72663c6b95436427ed9d0fc8ead1383c
parent0c7e6dd852f01b3ea38b98c39a2bb36280b02b55
Change value::contents to be a unique_xmalloc_ptr

This changes value::contents to be a unique_xmalloc_ptr, removing a
small bit of manual memory management.

gdb/ChangeLog
2018-04-06  Tom Tromey  <tom@tromey.com>

* value.c (~value): Update.
(struct value) <contents>: Now unique_xmalloc_ptr.
(value_contents_bits_eq, allocate_value_contents)
(value_contents_raw, value_contents_all_raw)
(value_contents_for_printing, value_contents_for_printing_const)
(set_value_enclosing_type): Update.
gdb/ChangeLog
gdb/value.c