]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
libctf: create, types: conflicting types
authorNick Alcock <nick.alcock@oracle.com>
Fri, 25 Apr 2025 10:23:46 +0000 (11:23 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Fri, 25 Apr 2025 17:07:43 +0000 (18:07 +0100)
commitd5dd8997b3464e7518e4a9db690fc4d195d8075f
treeb025da8b0f1182f12105d6be6ef27ba6f5cd30b0
parentfb8917ac21e4e14fc338eb8cbe18b00c5f005f36
libctf: create, types: conflicting types

The conflicting type kind is a CTF-specific prefix kind consisting purely of
an optional translation unit name.  It takes the place of the old hidden
bit: we have already seen it used to prefix types added with a
CTF_ADD_NONROOT flag.  The deduplicator will also use them to label
conflicting types from different TUs smushed into the same dict by the
CU-mapping mechanism: unlike the hidden bit, with this scheme users can tell
which CUs the conflicting types came from.

New API:

+int ctf_type_conflicting (ctf_dict_t *, ctf_id_t, const char **cuname);
+int ctf_set_conflicting (ctf_dict_t *, ctf_id_t, const char *);

(Frankly I expect ctf_set_conflicting to be used only by deduplicators and
things like that, but if we provide an option to query something we should
also provide an option to produce it...)
include/ctf-api.h
libctf/ctf-create.c
libctf/ctf-types.c
libctf/libctf.ver