From patchwork Mon Dec 14 23:08:54 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: 41385 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 E37FE3857C56; Mon, 14 Dec 2020 23:09:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E37FE3857C56 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1607987360; bh=Oa8YQw+LxZOhwkkOFXfQy5Fo5wT/L7iVfx8+5cvwPqM=; h=Date:In-Reply-To:References:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Help:List-Subscribe:From:Reply-To:Cc:From; b=GOPbENfA5byYiLnaMKn6nfwqiN/gpNAD4qqHM5HNLHeuoU3i+TJ0Rv/98RO6yMBRq GPIwGj0nEUmzA3m5pNaOJUdCcmK9CjAp1ak/47WuAUb5rVTIeJLmN7RR801gowpjLZ TDfgblaDid4QQ6oEfiKif9Mbvfyy+QAaGKLs9VWE= X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from mail-wr1-x449.google.com (mail-wr1-x449.google.com [IPv6:2a00:1450:4864:20::449]) by sourceware.org (Postfix) with ESMTPS id 676003857C55 for ; Mon, 14 Dec 2020 23:09:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 676003857C55 Received: by mail-wr1-x449.google.com with SMTP id 88so655432wrc.17 for ; Mon, 14 Dec 2020 15:09:18 -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=Oa8YQw+LxZOhwkkOFXfQy5Fo5wT/L7iVfx8+5cvwPqM=; b=fRzDluBp3Fnucl2tnUe9dxq+2bAfw4araO5mvKEThz5NFIphlqjBZVageuhIjzwM5w JAlBDjvgTBmE2B55QjSxMmkjFvbVQxYhgvBeknSCH/grkSi0sjVvI8c4LIKgfhm8yutH 6m/aCaaRz0kloo88nLuQHEjcX5Uvag87yn/9ONttP0ZTjnSqVRVuvq6Wn8SvZwYSndMZ vZMpjqvk42WFPDHjjBP1Z4PvtHKwpSQqed50hUjycQLQKJRMQ2bg0SGLh7YJcsheHBtx BzKfCvdVrdY3DfbhbEMV2HXIZT/es2hXiYNa+JFyFijvmnsIQCTUC/qihtDPL7wFskAi ph4A== X-Gm-Message-State: AOAM5328l1GqDoW4ff27Z/UtCFww2OFO7NtkMrbW0WZZjhzHfYjWd/ED 6qvgRTBTyGlVgrdHt85GUPT28//nvBoxKdM6cj8Kx6X/SDKYVNqhLgYHLQuU5OeGoS1+iOulQd8 mTuz3T0oVUQ7+Zp3P+AYohm+faXxJJyekQ8grtDkB8NCXNo+bYoqYUhkG5Zgv5PrNAW6M264= X-Google-Smtp-Source: ABdhPJwcRLOgz+OqrzkarMJlFvxHlgctJ4hdWPIy74pB/XZwJzsiGIWVFfralBFB4bjjO485Qj0AQyIC4Mjmew== X-Received: from lux.lon.corp.google.com ([2a00:79e0:d:210:7220:84ff:fe09:a3aa]) (user=maennich job=sendgmr) by 2002:a1c:4184:: with SMTP id o126mr29595022wma.107.1607987357365; Mon, 14 Dec 2020 15:09:17 -0800 (PST) Date: Mon, 14 Dec 2020 23:08:54 +0000 In-Reply-To: <20201214230855.1574934-1-maennich@google.com> Message-Id: <20201214230855.1574934-5-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 4/6] Remove usages from abg_compat To: libabigail@sourceware.org X-Spam-Status: No, score=-23.4 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_map 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 layer for . * include/abg-comparison.h: migrate abg_compat use to std. * include/abg-cxx-compat.h: Likewise. * include/abg-fwd.h: Likewise. * include/abg-ir.h: Likewise. * src/abg-corpus.cc: Likewise. * src/abg-dwarf-reader.cc: Likewise. * src/abg-ir.cc: Likewise. * src/abg-reader.cc: Likewise. * src/abg-writer.cc: Likewise. Signed-off-by: Matthias Maennich --- include/abg-comparison.h | 3 ++- include/abg-cxx-compat.h | 4 ---- include/abg-fwd.h | 3 ++- include/abg-ir.h | 9 +++++---- src/abg-corpus.cc | 3 ++- src/abg-dwarf-reader.cc | 3 ++- src/abg-ir.cc | 3 ++- src/abg-reader.cc | 5 +++-- src/abg-writer.cc | 3 ++- 9 files changed, 20 insertions(+), 16 deletions(-) diff --git a/include/abg-comparison.h b/include/abg-comparison.h index f3d33e9a28af..c9e8df7624d2 100644 --- a/include/abg-comparison.h +++ b/include/abg-comparison.h @@ -11,6 +11,7 @@ /// @file #include +#include #include "abg-cxx-compat.h" #include "abg-corpus.h" #include "abg-diff-utils.h" @@ -36,7 +37,7 @@ typedef std::vector filters; // Inject types we need into this namespace. using std::ostream; using std::vector; -using abg_compat::unordered_map; +using std::unordered_map; using abg_compat::unordered_set; using std::pair; diff --git a/include/abg-cxx-compat.h b/include/abg-cxx-compat.h index 2d3b2b036a37..fd693933d65f 100644 --- a/include/abg-cxx-compat.h +++ b/include/abg-cxx-compat.h @@ -8,14 +8,10 @@ #ifndef __ABG_CXX_COMPAT_H #define __ABG_CXX_COMPAT_H -#include #include namespace abg_compat { -// -using std::unordered_map; - // using std::unordered_set; diff --git a/include/abg-fwd.h b/include/abg-fwd.h index 0eba77175636..4d594afaccf6 100644 --- a/include/abg-fwd.h +++ b/include/abg-fwd.h @@ -16,6 +16,7 @@ #include #include #include +#include #include // for std::rel_ops, at least. #include #include "abg-cxx-compat.h" @@ -51,7 +52,7 @@ namespace abigail // Inject some types. using std::shared_ptr; using std::weak_ptr; -using abg_compat::unordered_map; +using std::unordered_map; using std::string; using std::vector; diff --git a/include/abg-ir.h b/include/abg-ir.h index 561d20960ed4..06e03b5f14c9 100644 --- a/include/abg-ir.h +++ b/include/abg-ir.h @@ -20,6 +20,7 @@ #include #include #include +#include #include "abg-cxx-compat.h" #include "abg-fwd.h" #include "abg-hash.h" @@ -92,7 +93,7 @@ namespace ir { // Inject some std types in here. -using abg_compat::unordered_map; +using std::unordered_map; /// A convenience typedef fo r an ordered set of size_t. typedef unordered_set pointer_set; @@ -138,7 +139,7 @@ public: /// the pretty representation string of a particular type and the /// value is the vector of canonical types that have the same pretty /// representation string. - typedef abg_compat::unordered_map > + typedef std::unordered_map > canonical_types_map_type; private: @@ -758,7 +759,7 @@ typedef weak_ptr elf_symbol_wptr; /// Convenience typedef for a map which key is a string and which /// value if the elf symbol of the same name. -typedef abg_compat::unordered_map +typedef std::unordered_map string_elf_symbol_sptr_map_type; /// Convenience typedef for a shared pointer to an @@ -771,7 +772,7 @@ typedef std::vector elf_symbols; /// Convenience typedef for a map which key is a string and which /// value is a vector of elf_symbol. -typedef abg_compat::unordered_map +typedef std::unordered_map string_elf_symbols_map_type; /// Convenience typedef for a shared pointer to diff --git a/src/abg-corpus.cc b/src/abg-corpus.cc index 6924944cb618..e2319d186259 100644 --- a/src/abg-corpus.cc +++ b/src/abg-corpus.cc @@ -12,6 +12,7 @@ #include #include #include +#include #include "abg-cxx-compat.h" #include "abg-internal.h" @@ -43,7 +44,7 @@ namespace ir { using std::ostringstream; -using abg_compat::unordered_map; +using std::unordered_map; using std::list; using std::vector; diff --git a/src/abg-dwarf-reader.cc b/src/abg-dwarf-reader.cc index e8f43bc6ab57..c3723ae15236 100644 --- a/src/abg-dwarf-reader.cc +++ b/src/abg-dwarf-reader.cc @@ -30,6 +30,7 @@ #include #include #include +#include #include "abg-cxx-compat.h" #include "abg-ir-priv.h" @@ -65,7 +66,7 @@ namespace dwarf_reader using std::dynamic_pointer_cast; using std::static_pointer_cast; -using abg_compat::unordered_map; +using std::unordered_map; using abg_compat::unordered_set; using std::stack; using std::deque; diff --git a/src/abg-ir.cc b/src/abg-ir.cc index 4fbbc6a3a211..5f931ee79509 100644 --- a/src/abg-ir.cc +++ b/src/abg-ir.cc @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -117,7 +118,7 @@ namespace abigail using std::string; using std::list; using std::vector; -using abg_compat::unordered_map; +using std::unordered_map; using std::dynamic_pointer_cast; using std::static_pointer_cast; diff --git a/src/abg-reader.cc b/src/abg-reader.cc index c89e3ccd29d6..fb7326ed1b81 100644 --- a/src/abg-reader.cc +++ b/src/abg-reader.cc @@ -20,6 +20,7 @@ #include #include #include +#include #include "abg-cxx-compat.h" #include "abg-suppression-priv.h" @@ -52,7 +53,7 @@ namespace xml_reader using std::string; using std::deque; using std::shared_ptr; -using abg_compat::unordered_map; +using std::unordered_map; using std::dynamic_pointer_cast; using std::vector; using std::istream; @@ -2886,7 +2887,7 @@ build_elf_symbol_db(read_context& ctxt, ctxt.set_corpus_node(node); - typedef abg_compat::unordered_map + typedef std::unordered_map xml_node_ptr_elf_symbol_sptr_map_type; xml_node_ptr_elf_symbol_sptr_map_type xml_node_ptr_elf_symbol_map; diff --git a/src/abg-writer.cc b/src/abg-writer.cc index 494847b8635b..0953c8b3c7ee 100644 --- a/src/abg-writer.cc +++ b/src/abg-writer.cc @@ -19,6 +19,7 @@ #include #include #include +#include #include #include "abg-cxx-compat.h" @@ -56,7 +57,7 @@ using std::ostringstream; using std::list; using std::vector; using std::stack; -using abg_compat::unordered_map; +using std::unordered_map; using abigail::sptr_utils::noop_deleter; #if WITH_ZIP_ARCHIVE