[0/3] Improve resolution of declaration-only enums

Message ID 20220825114856.3137373-1-gprocida@google.com
Headers
Series Improve resolution of declaration-only enums |

Message

Giuliano Procida Aug. 25, 2022, 11:48 a.m. UTC
  Hi Dodji.

We noticed this sort of output in Android kernel ABI XML:

    <enum-decl name='dax_access_mode' is-declaration-only='yes' id='241913bb'>
      <underlying-type type-id='52ba91e1'/>
    </enum-decl>
    ...
    <enum-decl name='dax_access_mode' filepath='include/linux/dax.h' line='17' column='1' id='241913ba'>
      <underlying-type type-id='9cac1fee'/>
      <enumerator name='DAX_ACCESS' value='0'/>
      <enumerator name='DAX_RECOVERY_WRITE' value='1'/>
    </enum-decl>

Note that they have distinct type ids and are both referenced by the
rest of the ABI.

This short series fixes the issue and another minor bug at the same
time.

Regards,
Giuliano.

Giuliano Procida (3):
  abidw: fix --stats output for resolved classes and enums
  abidw: remove always true test in resolve_declaration_only_classes
  abidw: resolve declaration-only enums the same as classes

 src/abg-dwarf-reader.cc | 84 ++++++++++++++++++++++++++++-------------
 1 file changed, 57 insertions(+), 27 deletions(-)