From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <3NYqVYAgKCqoQZbYMSNKQYYQVO.MYWVSLKLSQKSVcYebMOgKbO.YbQ@flex--gprocida.bounces.google.com> Received: from mail-wr1-x44a.google.com (mail-wr1-x44a.google.com [IPv6:2a00:1450:4864:20::44a]) by sourceware.org (Postfix) with ESMTPS id 676653853829 for ; Fri, 7 May 2021 18:43:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 676653853829 Received: by mail-wr1-x44a.google.com with SMTP id 91-20020adf94640000b029010b019075afso3932673wrq.17 for ; Fri, 07 May 2021 11:43:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=BrGiN8J3WRAlM5MeHLj+OwQCFy9AhXbASjW7JpHqCiI=; b=ZgzZWxfxXgL8cmRuptiExcJBA3LNhAGLGUw6SyWHxHUeO6DHT1wYoX+z5ZwhkSMzpx Eaq+dIB1H/WkQPUrKzBc3jqKHBq2163IvxpAAL+bAuNkcX2cQt2z1yePaMuKWEe+NbvR HkqXQ6bLj5WLeqAYFbcubbTV/O5P8bQFoyN/Ia3Bs0LL3B0DiQxW4davxflemekgUr00 2xW2b3aWnisXNC8VibHws9924RzaCdfm6w6PURgFxPWbkS4EKr9XzjK63vBAOnCMdawC rGq21XmtwlyG5IbAfhq4M4FTX6uZFAkor5ykwwWQu2lKtsKGBoUajFp0EgTz2E7Ecrnz ImPQ== X-Gm-Message-State: AOAM531Im6EKKS81zcd6ptpsv+kpyHH16SNNEI7MSLnh1S5fef485PJT EHqkVXHNiYSEFTKtfCGS1ZxiuIuZjAlQhnAE6ZCjLto4/4/zebxJb7ElQNPZ8spJuc9hfoBS/2b XArYWHuPrF3TlvQ8tpcWAPojhvMQNxOiYvOEWGRZmxH+iiEuYIoe1J0UlS2gIRCYSvC7mz7w= X-Google-Smtp-Source: ABdhPJxzUNZNKYnz9WZRSBV/8P1NM/sz8m7OTiC7eW2nIPxIRSkK/bneQGiqxIZoHoO+Y+NWzYp3JCEAxGoONQ== X-Received: from tef.lon.corp.google.com ([2a00:79e0:d:210:e199:ad3e:6253:8fbc]) (user=gprocida job=sendgmr) by 2002:adf:8046:: with SMTP id 64mr13892987wrk.176.1620412981331; Fri, 07 May 2021 11:43:01 -0700 (PDT) Date: Fri, 7 May 2021 19:42:48 +0100 In-Reply-To: <20210507184250.3946416-1-gprocida@google.com> Message-Id: <20210507184250.3946416-2-gprocida@google.com> Mime-Version: 1.0 References: <20210507184250.3946416-1-gprocida@google.com> X-Mailer: git-send-email 2.31.1.607.g51e8a6a459-goog Subject: [RFC PATCH 1/3] XML writer: treat function types more uniformly From: Giuliano Procida To: libabigail@sourceware.org Cc: dodji@seketeli.org, kernel-team@android.com, gprocida@google.com, maennich@google.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-16.4 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 May 2021 18:43:04 -0000 Bug 26591 - detect pathologically redundant types in abixml The XML writer has some special treatment of function types (compared with pointer types, for example). This commit removes the special treatment. While I believe this is a safe and reasonably sensible thing to do, the real reason for this change is that it makes the following changes to eliminate duplicate types work properly. * src/abg-writer.cc (fn_type_ptr_set_type): Remove typedef. (writer_context::m_referenced_fn_types_set): Remove member. (writer_context::get_referenced_types): Adjust documentation. (writer_context::get_referenced_non_canonical_types): Ditto. (writer_context::record_type_as_referenced): Adjust documentation and remove special handling of function types. (writer_context::type_is_referenced): Ditto. (writer_context::clear something): Remove special handling of function types. (writer_context::write_translation_unit): Adjust comments. Remove special handling of function types. Drop code that attempts to emit live TU function types that are referenced and unemitted. * tests/data/test-annotate/test13-pr18894.so.abi: Refresh. * tests/data/test-annotate/test14-pr18893.so.abi: Refresh. * 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-annotate/test21-pr19092.so.abi: Refresh. * tests/data/test-read-dwarf/PR25042-libgdbm-clang-dwarf5.so.6.0.0.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/test13-pr18894.so.abi: Refresh. * tests/data/test-read-dwarf/test14-pr18893.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/test21-pr19092.so.abi: Refresh. * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi: Refresh. Signed-off-by: Giuliano Procida --- src/abg-writer.cc | 77 +- .../data/test-annotate/test13-pr18894.so.abi | 90 +- .../data/test-annotate/test14-pr18893.so.abi | 1176 +- .../data/test-annotate/test15-pr18892.so.abi | 14882 ++++++++-------- .../data/test-annotate/test17-pr19027.so.abi | 5277 +++--- ...19-pr19023-libtcmalloc_and_profiler.so.abi | 4101 ++--- ...st20-pr19025-libvtkParallelCore-6.1.so.abi | 44 +- .../data/test-annotate/test21-pr19092.so.abi | 2774 +-- .../PR25042-libgdbm-clang-dwarf5.so.6.0.0.abi | 156 +- .../test-read-dwarf/test-libandroid.so.abi | 54 +- .../test-read-dwarf/test12-pr18844.so.abi | 22 +- .../test-read-dwarf/test13-pr18894.so.abi | 50 +- .../test-read-dwarf/test14-pr18893.so.abi | 1130 +- .../test-read-dwarf/test15-pr18892.so.abi | 14709 +++++++-------- .../test-read-dwarf/test16-pr18904.so.abi | 14 +- .../test-read-dwarf/test17-pr19027.so.abi | 4928 ++--- ...19-pr19023-libtcmalloc_and_profiler.so.abi | 3949 ++-- ...st20-pr19025-libvtkParallelCore-6.1.so.abi | 24 +- .../test-read-dwarf/test21-pr19092.so.abi | 2100 +-- .../test22-pr19097-libstdc++.so.6.0.17.so.abi | 9292 +++++----- 20 files changed, 32750 insertions(+), 32099 deletions(-) Patch too large to post here. See: https://github.com/myxoid/libabigail/commit/3c7b1189ecec88cfb0bedd30d514ec84040c775e