qapi-visit: Split off visit_type_FOO_fields forward decl
commitd02cf37766ba3cf918d7085aa7848c9dc05fd11a
authorEric Blake <eblake@redhat.com>
Mon, 26 Oct 2015 22:34:46 +0000 (26 16:34 -0600)
committerMarkus Armbruster <armbru@redhat.com>
Mon, 2 Nov 2015 07:30:26 +0000 (2 08:30 +0100)
treeeb3816d6d0132fd3128c3144f2784740d5ff19a2
parent98481bfcd661daa3c160cc87a297b0e60a307788
qapi-visit: Split off visit_type_FOO_fields forward decl

We generate a static visit_type_FOO_fields() for every type
FOO.  However, sometimes we need a forward declaration. Split
the code to generate the forward declaration out of
gen_visit_implicit_struct() into a new gen_visit_fields_decl(),
and also prepare for a forward declaration to be emitted
during gen_visit_struct(), so that a future patch can switch
from using visit_type_FOO_implicit() to the simpler
visit_type_FOO_fields() as part of unboxing the base class
of a struct.

No change to generated code.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1445898903-12082-8-git-send-email-eblake@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
scripts/qapi-visit.py