unicorn/qemu
Markus Armbruster baa36c6c88
qapi-visit: Convert to QAPISchemaVisitor, fixing bugs
Fixes flat unions to visit the base's base members (the previous
commit merely added them to the struct). Same test case.

Patch's effect on visit_type_UserDefFlatUnion():

static void visit_type_UserDefFlatUnion_fields(Visitor *m, UserDefFlatUnion **obj, Error **errp)
{
Error *err = NULL;

+ visit_type_int(m, &(*obj)->integer, "integer", &err);
+ if (err) {
+ goto out;
+ }
visit_type_str(m, &(*obj)->string, "string", &err);
if (err) {
goto out;

Test cases updated for the bug fix.

Fixes alternates to generate a visitor for their implicit enumeration
type. None of them are currently used, obviously. Example:
block-core.json's BlockdevRef now generates
visit_type_BlockdevRefKind().

Code is generated in a different order now, and therefore has got a
few new forward declarations. Doesn't matter.

The guard QAPI_VISIT_BUILTIN_VISITOR_DECL is renamed to
QAPI_VISIT_BUILTIN.

The previous commit's two ugly special cases exist here, too. Mark
both TODO.

Backports commit 441cbac0c7e641780decbc674a9a68c6a5200f71 from qemu
2018-02-19 17:04:59 -05:00
..
crypto
default-configs
docs
fpu all: Clean up includes 2018-02-19 01:34:28 -05:00
hw
include qom: Make enum string tables const-correct 2018-02-19 16:02:23 -05:00
qapi qom: Make enum string tables const-correct 2018-02-19 16:02:23 -05:00
qobject qobject: Clean up includes 2018-02-19 01:30:42 -05:00
qom qom: Clean up includes 2018-02-19 01:31:35 -05:00
scripts qapi-visit: Convert to QAPISchemaVisitor, fixing bugs 2018-02-19 17:04:59 -05:00
target-arm tcg: Remove lingering references to gen_opc_buf 2018-02-19 01:42:55 -05:00
target-i386 tcg: Remove lingering references to gen_opc_buf 2018-02-19 01:42:55 -05:00
target-m68k
target-mips
target-sparc
tcg tcg: Introduce temp_load 2018-02-19 11:44:01 -05:00
util util: Clean up includes 2018-02-19 01:27:55 -05:00
aarch64.h
aarch64eb.h
accel.c all: Clean up includes 2018-02-19 01:34:28 -05:00
arm.h
armeb.h
CODING_STYLE
configure
COPYING
COPYING.LIB
cpu-exec-common.c
cpu-exec.c
cpus.c
cputlb.c
exec.c
gen_all_header.sh
glib_compat.c
HACKING
header_gen.py
ioport.c all: Clean up includes 2018-02-19 01:34:28 -05:00
LICENSE
m68k.h
Makefile qapi: Turn generators' mandatory option -i into an argument 2018-02-19 15:22:27 -05:00
Makefile.objs
Makefile.target
memory.c
memory_mapping.c all: Clean up includes 2018-02-19 01:34:28 -05:00
mips.h
mips64.h
mips64el.h
mipsel.h
powerpc.h
qapi-schema.json qapi: Use 'struct' instead of 'type' in schema 2018-02-19 14:22:13 -05:00
qemu-log.c all: Clean up includes 2018-02-19 01:34:28 -05:00
qemu-timer.c all: Clean up includes 2018-02-19 01:34:28 -05:00
rules.mak
softmmu_template.h
sparc.h
sparc64.h
tcg-runtime.c all: Clean up includes 2018-02-19 01:34:28 -05:00
translate-all.c all: Clean up includes 2018-02-19 01:34:28 -05:00
translate-all.h
translate-common.c
unicorn_common.h
VERSION
vl.c
vl.h
x86_64.h