public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: Giuliano Procida <gprocida@google.com>
To: libabigail@sourceware.org
Cc: dodji@seketeli.org, kernel-team@android.com, gprocida@google.com,
	 maennich@google.com
Subject: [RFC PATCH 3/3] XML writer: emit enclosing types of scoped declarations
Date: Fri,  7 May 2021 19:42:50 +0100	[thread overview]
Message-ID: <20210507184250.3946416-4-gprocida@google.com> (raw)
In-Reply-To: <20210507184250.3946416-1-gprocida@google.com>

Bug 26591 - detect pathologically redundant types in abixml

One source of duplicated type ids in ABI XML is the writer emitting
scoped (nested) typed declarations before a later TU causes the
emission of the complete enclosing type declaration.

This commit causes the outermost enclosing type declaration to be
emitted immediately. This also prevents the later duplicate emission
of the type and any of its nested member types.

	* src/abg-writer.cc: (write_decl_in_scope): Emit the enclosing
	types of any nested type declaration.
	* tests/data/test-annotate/test15-pr18892.so.abi: Refresh.
	* tests/data/test-annotate/test17-pr19027.so.abi: Refresh.
	* tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi:
	Refresh.
	* tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi:
	Refresh.
	* tests/data/test-read-dwarf/test-libandroid.so.abi: Refresh.
	* tests/data/test-read-dwarf/test12-pr18844.so.abi: Refresh.
	* tests/data/test-read-dwarf/test15-pr18892.so.abi: Refresh.
	* tests/data/test-read-dwarf/test16-pr18904.so.abi: Refresh.
	* tests/data/test-read-dwarf/test17-pr19027.so.abi: Refresh.
	* tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
	Refresh.
	* tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi:
	Refresh.
	* tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
	Refresh.
	* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Refresh.

Signed-off-by: Giuliano Procida <gprocida@google.com>
---
 src/abg-writer.cc                             |    32 +-
 .../data/test-annotate/test15-pr18892.so.abi  |   250 +-
 .../data/test-annotate/test17-pr19027.so.abi  |  2494 ++-
 ...19-pr19023-libtcmalloc_and_profiler.so.abi |  8004 ++++----
 ...st20-pr19025-libvtkParallelCore-6.1.so.abi |  2235 +--
 .../test-read-dwarf/test-libandroid.so.abi    |   276 +-
 .../test-read-dwarf/test10-pr18818-gcc.so.abi |     5 -
 .../test-read-dwarf/test12-pr18844.so.abi     |  1586 +-
 .../test-read-dwarf/test15-pr18892.so.abi     |   189 +-
 .../test-read-dwarf/test16-pr18904.so.abi     |  3860 ++--
 .../test-read-dwarf/test17-pr19027.so.abi     |  1557 +-
 ...19-pr19023-libtcmalloc_and_profiler.so.abi |  1955 +-
 ...st20-pr19025-libvtkParallelCore-6.1.so.abi |  1844 +-
 .../test22-pr19097-libstdc++.so.6.0.17.so.abi | 15644 ++++++++--------
 .../test9-pr18818-clang.so.abi                |    12 -
 15 files changed, 19556 insertions(+), 20387 deletions(-)

Patch quite large, not posting here. See:
https://github.com/myxoid/libabigail/commit/8fa8c3ae853cf2c1fabbc3795f5d7212bfd80619

      parent reply	other threads:[~2021-05-07 18:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-07 18:42 [RFC PATCH 0/3] Bug 26591 - tentative fix for some duplicate type ids Giuliano Procida
2021-05-07 18:42 ` [RFC PATCH 1/3] XML writer: treat function types more uniformly Giuliano Procida
2021-05-07 18:42 ` [RFC PATCH 2/3] XML writer: don't emit already emitted types Giuliano Procida
2021-05-07 18:42 ` Giuliano Procida [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210507184250.3946416-4-gprocida@google.com \
    --to=gprocida@google.com \
    --cc=dodji@seketeli.org \
    --cc=kernel-team@android.com \
    --cc=libabigail@sourceware.org \
    --cc=maennich@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).