unicorn/qemu/scripts/qapi
Anton Nefedov 559833a0d4
qapi: allow empty branches in flat unions
It often happens that just a few discriminator values imply extra data in
a flat union. Existing checks did not make possible to leave other values
uncovered. Such cases had to be worked around by either stating a dummy
(empty) type or introducing another (subset) discriminator enumeration.

Both options create redundant entities in qapi files for little profit.

With this patch it is not necessary anymore to add designated union
fields for every possible value of a discriminator enumeration.

Backports commit 800877bb1639d38ffaebe312a37b61c66bb10c83 from qemu
2018-07-02 22:59:43 -04:00
..
__init__.py qapi-gen: New common driver for code and doc generators 2018-03-09 08:47:12 -05:00
common.py qapi: allow empty branches in flat unions 2018-07-02 22:59:43 -04:00
events.py qapi/events: generate event enum in main module 2018-06-29 14:19:06 -05:00
types.py qapi: allow empty branches in flat unions 2018-07-02 22:59:43 -04:00
visit.py qapi: allow empty branches in flat unions 2018-07-02 22:59:43 -04:00