std::unordered_map is now provided through the language standard, hence
remove the compatibility code for <unordered_map> and adjust all users
accordingly.
* include/abg-cxx-compat.h: Drop compatibility layer for <unordered_map>.
* 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 <maennich@google.com>
---
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(-)
@@ -11,6 +11,7 @@
/// @file
#include <ostream>
+#include <unordered_map>
#include "abg-cxx-compat.h"
#include "abg-corpus.h"
#include "abg-diff-utils.h"
@@ -36,7 +37,7 @@ typedef std::vector<filter_base_sptr> 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;
@@ -8,14 +8,10 @@
#ifndef __ABG_CXX_COMPAT_H
#define __ABG_CXX_COMPAT_H
-#include <unordered_map>
#include <unordered_set>
namespace abg_compat {
-// <unordered_map>
-using std::unordered_map;
-
// <unordered_set>
using std::unordered_set;
@@ -16,6 +16,7 @@
#include <ostream>
#include <string>
#include <typeinfo>
+#include <unordered_map>
#include <utility> // for std::rel_ops, at least.
#include <vector>
#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;
@@ -20,6 +20,7 @@
#include <cstdlib>
#include <functional>
#include <set>
+#include <unordered_map>
#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<size_t> 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<string, std::vector<type_base_sptr> >
+ typedef std::unordered_map<string, std::vector<type_base_sptr> >
canonical_types_map_type;
private:
@@ -758,7 +759,7 @@ typedef weak_ptr<elf_symbol> 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<string, elf_symbol_sptr>
+typedef std::unordered_map<string, elf_symbol_sptr>
string_elf_symbol_sptr_map_type;
/// Convenience typedef for a shared pointer to an
@@ -771,7 +772,7 @@ typedef std::vector<elf_symbol_sptr> 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<string, elf_symbols>
+typedef std::unordered_map<string, elf_symbols>
string_elf_symbols_map_type;
/// Convenience typedef for a shared pointer to
@@ -12,6 +12,7 @@
#include <cstdio>
#include <cstring>
#include <stdexcept>
+#include <unordered_map>
#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;
@@ -30,6 +30,7 @@
#include <ostream>
#include <sstream>
#include <stack>
+#include <unordered_map>
#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;
@@ -16,6 +16,7 @@
#include <memory>
#include <sstream>
#include <typeinfo>
+#include <unordered_map>
#include <utility>
#include <vector>
@@ -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;
@@ -20,6 +20,7 @@
#include <deque>
#include <memory>
#include <sstream>
+#include <unordered_map>
#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<xmlNodePtr, elf_symbol_sptr>
+ typedef std::unordered_map<xmlNodePtr, elf_symbol_sptr>
xml_node_ptr_elf_symbol_sptr_map_type;
xml_node_ptr_elf_symbol_sptr_map_type xml_node_ptr_elf_symbol_map;
@@ -19,6 +19,7 @@
#include <memory>
#include <sstream>
#include <stack>
+#include <unordered_map>
#include <vector>
#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