From patchwork Mon Dec 14 23:08:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Matthias_M=C3=A4nnich?= X-Patchwork-Id: 41386 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 62A39385800E; Mon, 14 Dec 2020 23:09:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 62A39385800E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1607987363; bh=IKwUHf+Oy+EGEg/HtJodkQffU87a1dnUHVS2D0b2Uh8=; h=Date:In-Reply-To:References:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Help:List-Subscribe:From:Reply-To:Cc:From; b=jpHKbyjOyH96NopYNDyPQNzzLrtivTf5swjk1HR0i6QzYKXEwrbfl/GHIAuRkTFxd p1hQjEZRnV+jeAxDG0Ir21xqkYstinvTfZExkOm1VfB1/Qi248+55giSLSkDQPIcXs xvu9BPxkYOFREHlOJ0v0/5SOkCEhbROvDozNxkzo= X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from mail-qt1-x849.google.com (mail-qt1-x849.google.com [IPv6:2607:f8b0:4864:20::849]) by sourceware.org (Postfix) with ESMTPS id 197183858D29 for ; Mon, 14 Dec 2020 23:09:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 197183858D29 Received: by mail-qt1-x849.google.com with SMTP id 99so12881594qte.19 for ; Mon, 14 Dec 2020 15:09:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=IKwUHf+Oy+EGEg/HtJodkQffU87a1dnUHVS2D0b2Uh8=; b=hAbMFiGAL1+IEzbrJ9CKief5oACf5rYjMRbzEFfglHvVCTkGpQorFU8azhrqN4pnnh ERaxcq4pv9Hkqftx0QNfR66a2R0odZD/SQfvjVLVRbOD+3LQKoo8ZWtwDubak0nsNwYU Rzk8JSzUi3x+d9RLMQybm2/pf5UxK4pXbmBeb/zkl/OoJ1Km5GjaaGrBHR1eTK1Kbr7C iq7XfDaJtDTwCJto6Qcfx7yrSNJ5QDbDtPHKkKIF43JYdmWxXPGpolqj75RGUVqLXyKm NYIeYkNXy+5i4peG0WknFQikq6IaYpCnLxWBh9AnsYKNNxbYbY3CZo5oMhM/qRBrJHPP PElQ== X-Gm-Message-State: AOAM531IHAzquFz3GQr8I0UJ6kKIxKXU+cz3SFDLxzvfMhX8IEwsBQ46 tGqgTL+F/jRalvRczg1scZCeO10Qxe7P8+9Gx47GDqrC8uCcFgTkjKhkbOFIXytMUJxW0VwJcdu 2I5FMBKQ7kX0oom8F1izIomKfNkAxhhq20q3JueAd3MyUavn7blDBQr1mFdNJ4pT2yZlUfSw= X-Google-Smtp-Source: ABdhPJxEhfx5WUV7uAe1ROZNxdkT4mcgzDqyoZGKSqr0DUXikqzRUlnqQdwHy3Im7dFS20J3kEtfhd5/ZXRBLQ== X-Received: from lux.lon.corp.google.com ([2a00:79e0:d:210:7220:84ff:fe09:a3aa]) (user=maennich job=sendgmr) by 2002:a0c:efc9:: with SMTP id a9mr34339659qvt.31.1607987359607; Mon, 14 Dec 2020 15:09:19 -0800 (PST) Date: Mon, 14 Dec 2020 23:08:55 +0000 In-Reply-To: <20201214230855.1574934-1-maennich@google.com> Message-Id: <20201214230855.1574934-6-maennich@google.com> Mime-Version: 1.0 References: <20201214230855.1574934-1-maennich@google.com> X-Mailer: git-send-email 2.29.2.684.gfbc64c5ab5-goog Subject: [PATCH 5/6] Remove usages from abg_compat To: libabigail@sourceware.org X-Spam-Status: No, score=-22.2 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, 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-Patchwork-Original-From: Matthias Maennich via Libabigail From: =?utf-8?q?Matthias_M=C3=A4nnich?= Reply-To: Matthias Maennich Cc: maennich@google.com, kernel-team@android.com Errors-To: libabigail-bounces@sourceware.org Sender: "Libabigail" std::unordered_set is now provided through the language standard, hence remove the compatibility code for and adjust all users accordingly. * include/abg-cxx-compat.h: Drop compatibility for . * include/abg-comparison.h: migrate abg_compat use to std. * include/abg-interned-str.h: Likewise. * include/abg-suppression.h: Likewise. * src/abg-comparison-priv.h: Likewise. * src/abg-dwarf-reader.cc: Likewise. * tests/test-diff-suppr.cc: Likewise. * tools/abipkgdiff.cc: Likewise. Signed-off-by: Matthias Maennich --- include/abg-comparison.h | 3 ++- include/abg-cxx-compat.h | 5 ----- include/abg-interned-str.h | 3 ++- include/abg-suppression.h | 4 +++- src/abg-comparison-priv.h | 3 ++- src/abg-dwarf-reader.cc | 3 ++- tests/test-diff-suppr.cc | 3 ++- tools/abipkgdiff.cc | 3 ++- 8 files changed, 15 insertions(+), 12 deletions(-) diff --git a/include/abg-comparison.h b/include/abg-comparison.h index c9e8df7624d2..1da8215ef19e 100644 --- a/include/abg-comparison.h +++ b/include/abg-comparison.h @@ -12,6 +12,7 @@ #include #include +#include #include "abg-cxx-compat.h" #include "abg-corpus.h" #include "abg-diff-utils.h" @@ -38,7 +39,7 @@ typedef std::vector filters; using std::ostream; using std::vector; using std::unordered_map; -using abg_compat::unordered_set; +using std::unordered_set; using std::pair; using diff_utils::insertion; diff --git a/include/abg-cxx-compat.h b/include/abg-cxx-compat.h index fd693933d65f..838fa53707d1 100644 --- a/include/abg-cxx-compat.h +++ b/include/abg-cxx-compat.h @@ -8,13 +8,8 @@ #ifndef __ABG_CXX_COMPAT_H #define __ABG_CXX_COMPAT_H -#include - namespace abg_compat { -// -using std::unordered_set; - } #endif // __ABG_CXX_COMPAT_H diff --git a/include/abg-interned-str.h b/include/abg-interned-str.h index ed6499090c43..bd51350edd33 100644 --- a/include/abg-interned-str.h +++ b/include/abg-interned-str.h @@ -20,13 +20,14 @@ #include #include #include +#include #include "abg-cxx-compat.h" namespace abigail { // Inject some std types into this namespace. -using abg_compat::unordered_set; +using std::unordered_set; using std::shared_ptr; using std::string; using std::ostream; diff --git a/include/abg-suppression.h b/include/abg-suppression.h index dd575916068c..9c135607b42f 100644 --- a/include/abg-suppression.h +++ b/include/abg-suppression.h @@ -8,6 +8,8 @@ #ifndef __ABG_SUPPRESSION_H__ #define __ABG_SUPPRESSION_H__ +#include + #include "abg-cxx-compat.h" #include "abg-ini.h" #include "abg-comparison.h" @@ -28,7 +30,7 @@ namespace suppr { using namespace abigail::comparison; -using abg_compat::unordered_set; +using std::unordered_set; /// Base type of the suppression specifications types. /// diff --git a/src/abg-comparison-priv.h b/src/abg-comparison-priv.h index 1f04f3cbb61a..7b3587d8808d 100644 --- a/src/abg-comparison-priv.h +++ b/src/abg-comparison-priv.h @@ -20,6 +20,7 @@ #include "abg-internal.h" // #include +#include ABG_BEGIN_EXPORT_DECLARATIONS #include "abg-hash.h" @@ -38,7 +39,7 @@ namespace abigail namespace comparison { -using abg_compat::unordered_set; +using std::unordered_set; using namespace abigail::suppr; // Inject types from outside in here. diff --git a/src/abg-dwarf-reader.cc b/src/abg-dwarf-reader.cc index c3723ae15236..2e137b211e71 100644 --- a/src/abg-dwarf-reader.cc +++ b/src/abg-dwarf-reader.cc @@ -31,6 +31,7 @@ #include #include #include +#include #include "abg-cxx-compat.h" #include "abg-ir-priv.h" @@ -67,7 +68,7 @@ namespace dwarf_reader using std::dynamic_pointer_cast; using std::static_pointer_cast; using std::unordered_map; -using abg_compat::unordered_set; +using std::unordered_set; using std::stack; using std::deque; using std::list; diff --git a/tests/test-diff-suppr.cc b/tests/test-diff-suppr.cc index f6548d066391..0f7c448c7600 100644 --- a/tests/test-diff-suppr.cc +++ b/tests/test-diff-suppr.cc @@ -22,6 +22,7 @@ #include #include #include +#include #include "abg-cxx-compat.h" #include "abg-tools-utils.h" #include "abg-workers.h" @@ -2156,7 +2157,7 @@ main(int argc, char *argv[]) const std::string out_base_path = std::string(get_build_dir()) + "/tests/"; // output paths need to be unique to avoid collisions during parallel testing - abg_compat::unordered_set out_paths; + std::unordered_set out_paths; bool non_unique_output_paths = false; for (InOutSpec* s = in_out_specs; s->in_elfv0_path; ++s) { if (!out_paths.insert(s->out_report_path).second) { diff --git a/tools/abipkgdiff.cc b/tools/abipkgdiff.cc index 6c2c6a53bad3..3decc9205729 100644 --- a/tools/abipkgdiff.cc +++ b/tools/abipkgdiff.cc @@ -79,6 +79,7 @@ #include #include #include +#include #include #include "abg-cxx-compat.h" @@ -98,7 +99,7 @@ using std::ostream; using std::ofstream; using std::vector; using std::map; -using abg_compat::unordered_set; +using std::unordered_set; using std::set; using std::ostringstream; using std::shared_ptr;