Use htab_up in type copying

This changes create_copied_types_hash to return an htab_up, then
modifies the callers to avoid explicit use of htab_delete.

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

	* value.c (preserve_values): Update.
	* python/py-type.c (save_objfile_types): Update.
	* guile/scm-type.c (save_objfile_types): Update.
	* gdbtypes.h (create_copied_types_hash): Return htab_up.
	* gdbtypes.c (create_copied_types_hash): Return htab_up.
	* compile/compile-object-run.c (compile_object_run): Update.
This commit is contained in:
Tom Tromey
2020-09-17 11:47:50 -06:00
parent fa9b11648c
commit 6108fd1823
7 changed files with 27 additions and 28 deletions

View File

@ -2472,7 +2472,7 @@ extern int class_or_union_p (const struct type *);
extern void maintenance_print_type (const char *, int);
extern htab_t create_copied_types_hash (struct objfile *objfile);
extern htab_up create_copied_types_hash (struct objfile *objfile);
extern struct type *copy_type_recursive (struct objfile *objfile,
struct type *type,