It turned out a lot of empty translation unit can make it to the
abixml output. This patch reduces the number of these.
* src/abg-writer.cc (write_corpus): Do not emit a translation
unit that appears empty beforehand.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
corpus->get_translation_units().begin();
i != corpus->get_translation_units().end();
++i)
- write_translation_unit(**i, ctxt, get_indent_to_level(ctxt, indent, 1));
+ {
+ translation_unit& tu = **i;
+ if (!tu.is_empty())
+ write_translation_unit(tu, ctxt, get_indent_to_level(ctxt, indent, 1));
+ }
out << "</abi-corpus>\n";