fprintf: Consider enumerations without members as forward declarations

To avoid emitting:

  enum x86_intercept_stage {
  };

Which isn't compilable.

The DWARF info for this enum in the Linux kernel has the declaration
flag set, but somehow this is not being available when loading from BTF.

So do the best we can at this enumeration__fprintf() time, that is to
just print zero members enumerations as a forward declaration.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 file changed