unicorn/qemu/scripts
Markus Armbruster 23d14a2921
qapi-visit: Fix generated code when schema has forward refs
The visit_type_implicit_FOO() are generated on demand, right before
their first use. Used by visit_type_STRUCT_fields() when STRUCT has
base FOO, and by visit_type_UNION() when flat UNION has member a FOO.

If the schema defines FOO after its first use as struct base or flat
union member, visit_type_implicit_FOO() calls
visit_type_implicit_FOO() before its definition, which doesn't
compile.

Rearrange qapi-schema-test.json to demonstrate the bug.

Fix by generating the necessary forward declaration.

Backports commit 8c3f8e77215bfedb7854221868f655e148506936 from qemu
2018-02-19 16:16:19 -05:00
..
create_config more cleanup qemu/configure 2017-01-19 14:11:54 +08:00
make_device_config.sh fix file perms 2015-08-28 21:05:38 -07:00
ordereddict.py import 2015-08-21 15:04:50 +08:00
qapi-event.py qapi: Drop unused and useless parameters and variables 2018-02-19 16:11:35 -05:00
qapi-types.py qapi: Generate a nicer struct for flat unions 2018-02-19 16:14:51 -05:00
qapi-visit.py qapi-visit: Fix generated code when schema has forward refs 2018-02-19 16:16:19 -05:00
qapi.py qapi: Drop unused and useless parameters and variables 2018-02-19 16:11:35 -05:00