[PATCH 5/9] tools/abilint: Fix --annotate when reading free form translation units
Dodji Seketeli
dodji@seketeli.org
Thu Jul 30 18:17:48 GMT 2026
Hello,
It turned out "abilint --annotate" does not annotate the emitted ABIXML
if it is a free-form translation unit rather than a full-blown ABI
corpus. Fixed thus.
* tools/abilint.cc (main): When reading free form translation
units, call set_annotate on the write context before calling
write_translation_unit, so that the --annotate option is properly
honoured.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
Applied to the master branch.
---
tools/abilint.cc | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/abilint.cc b/tools/abilint.cc
index 22ac20ae..811d72e7 100644
--- a/tools/abilint.cc
+++ b/tools/abilint.cc
@@ -893,7 +893,10 @@ main(int argc, char* argv[])
if (tu)
{
if (!opts.noout)
- is_ok = write_translation_unit(*ctxt, *tu, 0);
+ {
+ set_annotate(*ctxt, opts.annotate);
+ is_ok = write_translation_unit(*ctxt, *tu, 0);
+ }
}
else
{
--
2.55.0
--
Dodji
More information about the Libabigail
mailing list