libctf, ld: fix formatting of forwards to unions and enums
authorNick Alcock <nick.alcock@oracle.com>
Tue, 5 Jan 2021 13:25:56 +0000 (13:25 +0000)
committerNick Alcock <nick.alcock@oracle.com>
Tue, 5 Jan 2021 14:53:40 +0000 (14:53 +0000)
commitb4b6ea46807ec9c01ed4f4f18a50840358d16c28
tree538a4618b793ecaa88896e1a66ba9b28ba601734
parent608a333d7d1ce111a4f69acea0ea6c7a2e81a766
libctf, ld: fix formatting of forwards to unions and enums

The type printer was unconditionally printing these as if they were
forwards to structs, even if they were forwards to unions or enums.

ld/ChangeLog
2021-01-05  Nick Alcock  <nick.alcock@oracle.com>

* testsuite/ld-ctf/enum-forward.c: New test.
* testsuite/ld-ctf/enum-forward.c: New results.

libctf/ChangeLog
2021-01-05  Nick Alcock  <nick.alcock@oracle.com>

* ctf-types.c (ctf_type_aname): Print forwards to unions and enums
properly.
ld/ChangeLog
ld/testsuite/ld-ctf/enum-forward.c [new file with mode: 0644]
ld/testsuite/ld-ctf/enum-forward.d [new file with mode: 0644]
libctf/ChangeLog
libctf/ctf-types.c