diff options
author | Nick Alcock <nick.alcock@oracle.com> | 2024-07-09 15:30:39 +0100 |
---|---|---|
committer | Nick Alcock <nick.alcock@oracle.com> | 2024-07-31 21:02:04 +0100 |
commit | 68720e03f58f4c4565f5d8724742acc5951210fa (patch) | |
tree | a793fada4066c12e8bbe51375ec1b849ae1e198c /libctf/ctf-impl.h | |
parent | 95861bb39663bd69e8dd9cbf0fe82b03b8634d94 (diff) | |
download | gdb-68720e03f58f4c4565f5d8724742acc5951210fa.zip gdb-68720e03f58f4c4565f5d8724742acc5951210fa.tar.gz gdb-68720e03f58f4c4565f5d8724742acc5951210fa.tar.bz2 |
libctf, dedup: drop unnecessary arg from ctf_dedup()
The PARENTS arg is carefully passed down through all the layers of hash
functions and then never used for anything. (In the distant past it was
used for cycle detection, but the algorithm eventually committed doesn't
need to do cycle detection...)
The PARENTS arg is still used by ctf_dedup_emit(), but even there we can
loosen the requirements and state that you can just leave entries
corresponding to dicts with no parents at zero (which will be useful
in an upcoming commit).
libctf/
* ctf-dedup.c (ctf_dedup_hash_type): Drop PARENTS arg.
(ctf_dedup_rhash_type): Likewise.
(ctf_dedup): Likewise.
(ctf_dedup_emit_struct_members): Mention what you can do to
PARENTS entries for parent dicts.
* ctf-impl.h (ctf_dedup): Adjust accordingly.
* ctf-link.c (ctf_link_deduplicating_per_cu): Likewise.
(ctf_link_deduplicating): Likewise.
Diffstat (limited to 'libctf/ctf-impl.h')
-rw-r--r-- | libctf/ctf-impl.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libctf/ctf-impl.h b/libctf/ctf-impl.h index 0a362b6..cd93a18 100644 --- a/libctf/ctf-impl.h +++ b/libctf/ctf-impl.h @@ -715,11 +715,11 @@ extern int ctf_add_funcobjt_sym_forced (ctf_dict_t *, int is_function, extern int ctf_dedup_atoms_init (ctf_dict_t *); extern int ctf_dedup (ctf_dict_t *, ctf_dict_t **, uint32_t ninputs, - uint32_t *parents, int cu_mapped); -extern void ctf_dedup_fini (ctf_dict_t *, ctf_dict_t **, uint32_t); + int cu_mapped); extern ctf_dict_t **ctf_dedup_emit (ctf_dict_t *, ctf_dict_t **, uint32_t ninputs, uint32_t *parents, uint32_t *noutputs, int cu_mapped); +extern void ctf_dedup_fini (ctf_dict_t *, ctf_dict_t **, uint32_t); extern ctf_id_t ctf_dedup_type_mapping (ctf_dict_t *fp, ctf_dict_t *src_fp, ctf_id_t src_type); |