[5/6] Remove <unordered_set> usages from abg_compat
Commit Message
std::unordered_set is now provided through the language standard, hence
remove the compatibility code for <unordered_set> and adjust all users
accordingly.
* include/abg-cxx-compat.h: Drop compatibility for <unordered_set>.
* 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 <maennich@google.com>
---
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(-)
@@ -12,6 +12,7 @@
#include <ostream>
#include <unordered_map>
+#include <unordered_set>
#include "abg-cxx-compat.h"
#include "abg-corpus.h"
#include "abg-diff-utils.h"
@@ -38,7 +39,7 @@ typedef std::vector<filter_base_sptr> 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;
@@ -8,13 +8,8 @@
#ifndef __ABG_CXX_COMPAT_H
#define __ABG_CXX_COMPAT_H
-#include <unordered_set>
-
namespace abg_compat {
-// <unordered_set>
-using std::unordered_set;
-
}
#endif // __ABG_CXX_COMPAT_H
@@ -20,13 +20,14 @@
#include <memory>
#include <ostream>
#include <string>
+#include <unordered_set>
#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;
@@ -8,6 +8,8 @@
#ifndef __ABG_SUPPRESSION_H__
#define __ABG_SUPPRESSION_H__
+#include <unordered_set>
+
#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.
///
@@ -20,6 +20,7 @@
#include "abg-internal.h"
// <headers defining libabigail's API go under here>
#include <memory>
+#include <unordered_set>
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.
@@ -31,6 +31,7 @@
#include <sstream>
#include <stack>
#include <unordered_map>
+#include <unordered_set>
#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;
@@ -22,6 +22,7 @@
#include <iostream>
#include <memory>
#include <string>
+#include <unordered_set>
#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<std::string> out_paths;
+ std::unordered_set<std::string> 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) {
@@ -79,6 +79,7 @@
#include <map>
#include <memory>
#include <string>
+#include <unordered_set>
#include <vector>
#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;