[RFC,0/2] Incomplete enum support
Message ID | 20200423130356.93136-1-gprocida@google.com |
---|---|
Headers |
From: gprocida@google.com (Giuliano Procida) Date: Thu, 23 Apr 2020 14:03:54 +0100 Subject: [RFC PATCH 0/2] Incomplete enum support Message-ID: <20200423130356.93136-1-gprocida@google.com> |
Message
Giuliano Procida
April 23, 2020, 1:03 p.m. UTC
Incomplete enums are heavily used in the Linux kernel source as part of interface specifications. This code appears to work, but it is lightly tested and unreviewed. It also duplicates a lot of code that is used for incomplete class and union types. There may be a significant opportunity for refactoring and shared code and data. Giuliano Procida (2): Support declaration-only enums. Add tests for declaration-only enums. include/abg-comp-filter.h | 7 + include/abg-comparison.h | 7 + include/abg-fwd.h | 26 +- include/abg-ir.h | 23 ++ src/abg-comp-filter.cc | 78 ++++- src/abg-comparison.cc | 21 +- src/abg-default-reporter.cc | 34 +- src/abg-dwarf-reader.cc | 308 +++++++++++++++++- src/abg-ir.cc | 235 ++++++++++++- tests/data/Makefile.am | 5 + .../test-decl-enum-report.txt | 17 + .../test-abidiff-exit/test-decl-enum-v0.c | 5 + .../test-abidiff-exit/test-decl-enum-v0.o | Bin 0 -> 3048 bytes .../test-abidiff-exit/test-decl-enum-v1.c | 5 + .../test-abidiff-exit/test-decl-enum-v1.o | Bin 0 -> 3048 bytes tests/test-abidiff-exit.cc | 9 + 16 files changed, 754 insertions(+), 26 deletions(-) create mode 100644 tests/data/test-abidiff-exit/test-decl-enum-report.txt create mode 100644 tests/data/test-abidiff-exit/test-decl-enum-v0.c create mode 100644 tests/data/test-abidiff-exit/test-decl-enum-v0.o create mode 100644 tests/data/test-abidiff-exit/test-decl-enum-v1.c create mode 100644 tests/data/test-abidiff-exit/test-decl-enum-v1.o