summaryrefslogtreecommitdiffstats
path: root/tests/qapi-schema/empty.out
diff options
context:
space:
mode:
authorMarkus Armbruster2019-11-20 19:25:50 +0100
committerMarkus Armbruster2020-01-14 11:01:58 +0100
commit3e7fb5811baab213dcc7149c3aa69442d683c26c (patch)
tree4488c46b75ebf4f4746602217b51f29fc6fb5527 /tests/qapi-schema/empty.out
parentqapi: Proper intermediate representation for modules (diff)
downloadqemu-3e7fb5811baab213dcc7149c3aa69442d683c26c.tar.gz
qemu-3e7fb5811baab213dcc7149c3aa69442d683c26c.tar.xz
qemu-3e7fb5811baab213dcc7149c3aa69442d683c26c.zip
qapi: Fix code generation for empty modules
When a sub-module doesn't contain any definitions, we don't generate code for it, but we do generate the #include. We generate code only for modules that get visited. QAPISchema.visit() visits only modules that have definitions. It can visit modules multiple times. Clean this up as follows. Collect entities in their QAPISchemaModule. Have QAPISchema.visit() call QAPISchemaModule.visit() for each module. Have QAPISchemaModule.visit() call .visit_module() for itself, and QAPISchemaEntity.visit() for each of its entities. This way, we visit each module exactly once. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20191120182551.23795-6-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'tests/qapi-schema/empty.out')
-rw-r--r--tests/qapi-schema/empty.out1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/qapi-schema/empty.out b/tests/qapi-schema/empty.out
index 5b53d00702..69666c39ad 100644
--- a/tests/qapi-schema/empty.out
+++ b/tests/qapi-schema/empty.out
@@ -9,3 +9,4 @@ enum QType
member qdict
member qlist
member qbool
+module empty.json