abg-ini.h \
abg-workers.h \
abg-traverse.h \
+abg-cxx-compat.h \
abg-version.h \
abg-viz-common.h \
abg-viz-dot.h \
/// @file
-#include <tr1/unordered_map>
-#include <tr1/unordered_set>
#include <ostream>
+#include "abg-cxx-compat.h"
#include "abg-corpus.h"
#include "abg-diff-utils.h"
#include "abg-reporter.h"
// Inject types we need into this namespace.
using std::ostream;
using std::vector;
-using std::tr1::unordered_map;
-using std::tr1::unordered_set;
+using abg_compat::unordered_map;
+using abg_compat::unordered_set;
using std::pair;
using diff_utils::insertion;
--- /dev/null
+// -*- Mode: C++ -*-
+//
+// Copyright (C) 2019 Google, Inc.
+//
+// This file is part of the GNU Application Binary Interface Generic
+// Analysis and Instrumentation Library (libabigail). This library is
+// free software; you can redistribute it and/or modify it under the
+// terms of the GNU Lesser General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option) any
+// later version.
+
+// This library is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Lesser Public License for more details.
+
+// You should have received a copy of the GNU Lesser General Public
+// License along with this program; see the file COPYING-LGPLV2. If
+// not, see <http://www.gnu.org/licenses/>.
+
+/// @file
+
+#ifndef __ABG_CXX_COMPAT_H
+#define __ABG_CXX_COMPAT_H
+
+#if __cplusplus >= 201103L
+
+#include <functional>
+#include <memory>
+#include <unordered_map>
+#include <unordered_set>
+
+#else
+
+#include <tr1/functional>
+#include <tr1/memory>
+#include <tr1/unordered_map>
+#include <tr1/unordered_set>
+
+#endif
+
+namespace abg_compat {
+
+#if __cplusplus >= 201103L
+
+// <functional>
+using std::hash;
+
+// <memory>
+using std::shared_ptr;
+using std::weak_ptr;
+using std::dynamic_pointer_cast;
+using std::static_pointer_cast;
+
+// <unordered_map>
+using std::unordered_map;
+
+// <unordered_set>
+using std::unordered_set;
+
+#else
+
+// <functional>
+using std::tr1::hash;
+
+// <memory>
+using std::tr1::shared_ptr;
+using std::tr1::weak_ptr;
+using std::tr1::dynamic_pointer_cast;
+using std::tr1::static_pointer_cast;
+
+// <unordered_map>
+using std::tr1::unordered_map;
+
+// <unordered_set>
+using std::tr1::unordered_set;
+
+#endif
+
+}
+
+#endif // __ABG_CXX_COMPAT_H
#include <string>
#include <vector>
#include <sstream>
-#include <tr1/memory>
+#include "abg-cxx-compat.h"
#include "abg-fwd.h"
namespace abigail
namespace diff_utils
{
-using std::tr1::shared_ptr;
+using abg_compat::shared_ptr;
// Inject the names from std:: below into this namespace
using std::string;
#include <stdint.h>
#include <cstdlib>
#include <cstddef>
-#include <tr1/memory>
#include <list>
#include <vector>
#include <string>
-#include <tr1/functional>
-#include <tr1/unordered_map>
#include <typeinfo>
#include <utility> // for std::rel_ops, at least.
#include <ostream>
+#include "abg-cxx-compat.h"
#include "abg-interned-str.h"
#include "abg-hash.h"
*/
// Inject some types.
-using std::tr1::shared_ptr;
-using std::tr1::weak_ptr;
-using std::tr1::unordered_map;
+using abg_compat::shared_ptr;
+using abg_compat::weak_ptr;
+using abg_compat::unordered_map;
using std::string;
using std::vector;
/// This is a wrapper around the 'assert' glibc call. It allows for
/// its argument to have side effects, so that it keeps working when
/// the code of libabigail is compiled with the NDEBUG macro defined.
-#define ABG_ASSERT(cond) do {({bool __abg_cond__ = (cond); assert(__abg_cond__); !!__abg_cond__;});} while (false)
+#define ABG_ASSERT(cond) do {({bool __abg_cond__ = bool(cond); assert(__abg_cond__); !!__abg_cond__;});} while (false)
#endif
} // end namespace abigail
#ifndef __ABG_INI_H__
#define __ABG_INI_H__
-#include <tr1/memory>
#include <string>
#include <vector>
#include <istream>
#include <ostream>
+#include "abg-cxx-compat.h"
namespace abigail
{
namespace ini
{
// Inject some standard types in this namespace.
-using std::tr1::shared_ptr;
-using std::tr1::dynamic_pointer_cast;
+using abg_compat::shared_ptr;
+using abg_compat::dynamic_pointer_cast;
using std::string;
using std::vector;
using std:: pair;
#ifndef __ABG_INTERNED_STR_H__
#define __ABG_INTERNED_STR_H__
-#include <tr1/memory>
-#include <tr1/functional>
-#include <tr1/unordered_set>
#include <ostream>
#include <string>
+#include "abg-cxx-compat.h"
namespace abigail
{
// Inject some std types into this namespace.
-using std::tr1::unordered_set;
-using std::tr1::shared_ptr;
+using abg_compat::unordered_set;
+using abg_compat::shared_ptr;
using std::string;
using std::ostream;
size_t
operator()(const interned_string& s) const
{
- std::tr1::hash<size_t> hash_size_t;
+ abg_compat::hash<size_t> hash_size_t;
return hash_size_t(reinterpret_cast<size_t>(s.raw()));
}
}; // end struct hash_interned_string
#include <assert.h>
#include <stdint.h>
#include <cstdlib>
-#include <tr1/unordered_map>
+#include "abg-cxx-compat.h"
#include "abg-fwd.h"
#include "abg-hash.h"
#include "abg-traverse.h"
{
// Inject some std::tr1 types in here.
-using std::tr1::unordered_map;
+using abg_compat::unordered_map;
/// A convenience typedef fo r an ordered set of size_t.
typedef unordered_set<size_t> pointer_set;
/// 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 std::tr1::unordered_map<string,
- std::vector<type_base_sptr> > canonical_types_map_type;
+ typedef abg_compat::unordered_map<string, std::vector<type_base_sptr> >
+ canonical_types_map_type;
private:
struct priv;
operator()(const type_or_decl_base *artifact) const
{
string repr = get_pretty_representation(artifact);
- std::tr1::hash<string> do_hash;
+ abg_compat::hash<string> do_hash;
return do_hash(repr);
}
/// Convenience typedef for a map which key is a string and which
/// value if the elf symbol of the same name.
-typedef std::tr1::unordered_map<string, elf_symbol_sptr>
+typedef abg_compat::unordered_map<string, elf_symbol_sptr>
string_elf_symbol_sptr_map_type;
/// Convenience typedef for a shared pointer to an
/// Convenience typedef for a map which key is a string and which
/// value is a vector of elf_symbol.
-typedef std::tr1::unordered_map<string, elf_symbols>
+typedef abg_compat::unordered_map<string, elf_symbols>
string_elf_symbols_map_type;
/// Convenience typedef for a shared pointer to
/// @file
-#include <tr1/memory>
#include <istream>
-#include <abg-sptr-utils.h>
+#include "abg-sptr-utils.h"
+#include "abg-cxx-compat.h"
namespace abigail
{
{
using sptr_utils::build_sptr;
-using std::tr1::shared_ptr;
+using abg_compat::shared_ptr;
using sptr_utils::reader_sptr;
using sptr_utils::xml_char_sptr;
/// @file
-#include <tr1/memory>
#include <zip.h>
+#include "abg-cxx-compat.h"
namespace abigail
{
namespace zip_utils
{
-using std::tr1::shared_ptr;
+using abg_compat::shared_ptr;
using std::string;
/// @brief Functor passed to shared_ptr constructor during
#include <ostream>
#include <string>
-#include <tr1/memory>
+#include "abg-cxx-compat.h"
namespace abigail
{
using std::ostream;
-using std::tr1::shared_ptr;
+using abg_compat::shared_ptr;
namespace comparison
{
#ifndef __ABG_SPTR_UTILS_H__
#define __ABG_SPTR_UTILS_H__
-#include <tr1/memory>
#include <regex.h>
#include <libxml/xmlreader.h>
+#include "abg-cxx-compat.h"
namespace abigail
{
namespace sptr_utils
{
-using std::tr1::shared_ptr;
+using abg_compat::shared_ptr;
/// This is to be specialized for the diverse C types that needs
/// wrapping in shared_ptr.
#ifndef __ABG_SUPPRESSION_H__
#define __ABG_SUPPRESSION_H__
-#include <tr1/unordered_set>
+#include "abg-cxx-compat.h"
#include "abg-ini.h"
#include "abg-comparison.h"
{
using namespace abigail::comparison;
-using std::tr1::unordered_set;
+using abg_compat::unordered_set;
/// Base type of the suppression specifications types.
///
///@file
-#include <tr1/memory>
#include <string>
#include <set>
#include <ostream>
#include <istream>
#include <iostream>
-#include <abg-suppression.h>
+#include "abg-cxx-compat.h"
+#include "abg-suppression.h"
namespace abigail
{
using std::ifstream;
using std::string;
using std::set;
-using std::tr1::shared_ptr;
+using abg_compat::shared_ptr;
const char* get_system_libdir();
const char* get_anonymous_struct_internal_name_prefix();
file_is_kernel_debuginfo_package(const string& file_path,
file_type file_type);
-std::tr1::shared_ptr<char>
+abg_compat::shared_ptr<char>
make_path_absolute(const char*p);
char*
#ifndef __ABG_WORKERS_H__
#define __ABG_WORKERS_H__
-#include <tr1/memory>
#include <vector>
+#include "abg-cxx-compat.h"
-using std::tr1::shared_ptr;
+using abg_compat::shared_ptr;
namespace abigail
{
/// This file contains definitions of diff objects filtering
/// facilities.
+#include "abg-cxx-compat.h"
#include "abg-internal.h"
// <headers defining libabigail's API go under here>
ABG_BEGIN_EXPORT_DECLARATIONS
namespace filtering
{
-using std::tr1::dynamic_pointer_cast;
+using abg_compat::dynamic_pointer_cast;
/// Walk the diff sub-trees of a a @ref corpus_diff and apply a filter
/// to the nodes visted. The filter categorizes each node, assigning
#ifndef __ABG_COMPARISON_PRIV_H__
#define __ABG_COMPARISON_PRIV_H__
+#include "abg-cxx-compat.h"
#include "abg-internal.h"
// <headers defining libabigail's API go under here>
ABG_BEGIN_EXPORT_DECLARATIONS
namespace comparison
{
-using std::tr1::unordered_set;
+using abg_compat::unordered_set;
using namespace abigail::suppr;
// Inject types from outside in here.
using std::vector;
-using std::tr1::dynamic_pointer_cast;
-using std::tr1::static_pointer_cast;
+using abg_compat::dynamic_pointer_cast;
+using abg_compat::static_pointer_cast;
using abigail::sptr_utils::noop_deleter;
/// Convenience typedef for a pair of decls or types.
#include <cassert>
#include <stdexcept>
#include <algorithm>
-#include <tr1/unordered_map>
+#include "abg-cxx-compat.h"
#include "abg-internal.h"
// <headers defining libabigail's API go under here>
ABG_BEGIN_EXPORT_DECLARATIONS
{
using std::ostringstream;
-using std::tr1::unordered_map;
+using abg_compat::unordered_map;
using std::list;
using std::vector;
#include <elfutils/libdwfl.h>
#include <dwarf.h>
#include <algorithm>
-#include <tr1/unordered_map>
-#include <tr1/unordered_set>
#include <stack>
#include <deque>
#include <list>
#include <ostream>
#include <sstream>
+#include "abg-cxx-compat.h"
#include "abg-ir-priv.h"
#include "abg-suppression-priv.h"
#include "abg-corpus-priv.h"
namespace dwarf_reader
{
-using std::tr1::dynamic_pointer_cast;
-using std::tr1::static_pointer_cast;
-using std::tr1::unordered_map;
-using std::tr1::unordered_set;
+using abg_compat::dynamic_pointer_cast;
+using abg_compat::static_pointer_cast;
+using abg_compat::unordered_map;
+using abg_compat::unordered_set;
using std::stack;
using std::deque;
using std::list;
/// @return if there is a corpus group being built, false otherwise.
bool
has_corpus_group() const
- {return cur_corpus_group_;}
+ {return bool(cur_corpus_group_);}
/// Return the main corpus from the current corpus group, if any.
///
/// @file
+#include "abg-cxx-compat.h"
#include "abg-internal.h"
// <headers defining libabigail's API go under here>
ABG_BEGIN_EXPORT_DECLARATIONS
size_t
type_base::hash::operator()(const type_base& t) const
{
- std::tr1::hash<size_t> size_t_hash;
- std::tr1::hash<string> str_hash;
+ abg_compat::hash<size_t> size_t_hash;
+ abg_compat::hash<string> str_hash;
size_t v = str_hash(typeid(t).name());
v = hashing::combine_hashes(v, size_t_hash(t.get_size_in_bits()));
size_t
operator()(const decl_base& d) const
{
- std::tr1::hash<string> str_hash;
+ abg_compat::hash<string> str_hash;
size_t v = str_hash(typeid(d).name());
if (!d.get_linkage_name().empty())
{
decl_base::hash decl_hash;
type_base::hash type_hash;
- std::tr1::hash<string> str_hash;
+ abg_compat::hash<string> str_hash;
size_t v = str_hash(typeid(t).name());
v = hashing::combine_hashes(v, decl_hash(t));
size_t
scope_decl::hash::operator()(const scope_decl& d) const
{
- std::tr1::hash<string> hash_string;
+ abg_compat::hash<string> hash_string;
size_t v = hash_string(typeid(d).name());
for (scope_decl::declarations::const_iterator i =
d.get_member_decls().begin();
{
decl_base::hash decl_hash;
type_base::hash type_hash;
- std::tr1::hash<string> str_hash;
+ abg_compat::hash<string> str_hash;
size_t v = str_hash(typeid(t).name());
v = hashing::combine_hashes(v, decl_hash(t));
{
type_base::hash type_hash;
decl_base::hash decl_hash;
- std::tr1::hash<string> str_hash;
+ abg_compat::hash<string> str_hash;
size_t v = str_hash(typeid(t).name());
v = hashing::combine_hashes(v, type_hash(t));
size_t
operator()(const pointer_type_def& t) const
{
- std::tr1::hash<string> str_hash;
+ abg_compat::hash<string> str_hash;
type_base::hash type_base_hash;
decl_base::hash decl_hash;
type_base::shared_ptr_hash hash_type_ptr;
size_t
operator()(const reference_type_def& t)
{
- std::tr1::hash<string> hash_str;
+ abg_compat::hash<string> hash_str;
type_base::hash hash_type_base;
decl_base::hash hash_decl;
type_base::shared_ptr_hash hash_type_ptr;
size_t
operator()(const array_type_def::subrange_type& s) const
{
- std::tr1::hash<int> hash_size_t;
+ abg_compat::hash<int> hash_size_t;
size_t v = hash_size_t(hash_size_t(s.get_lower_bound()));
v = hashing::combine_hashes(v, hash_size_t(s.get_upper_bound()));
return v;
size_t
operator()(const array_type_def& t)
{
- std::tr1::hash<string> hash_str;
+ abg_compat::hash<string> hash_str;
type_base::hash hash_type_base;
decl_base::hash hash_decl;
type_base::shared_ptr_hash hash_type_ptr;
size_t
operator()(const enum_type_decl& t) const
{
- std::tr1::hash<string> str_hash;
+ abg_compat::hash<string> str_hash;
decl_base::hash decl_hash;
type_base::shared_ptr_hash type_ptr_hash;
- std::tr1::hash<size_t> size_t_hash;
+ abg_compat::hash<size_t> size_t_hash;
size_t v = str_hash(typeid(t).name());
v = hashing::combine_hashes(v, decl_hash(t));
size_t
operator()(const typedef_decl& t) const
{
- std::tr1::hash<string> str_hash;
+ abg_compat::hash<string> str_hash;
type_base::hash hash_type;
decl_base::hash decl_hash;
type_base::shared_ptr_hash type_ptr_hash;
size_t
var_decl::hash::operator()(const var_decl& t) const
{
- std::tr1::hash<string> hash_string;
+ abg_compat::hash<string> hash_string;
decl_base::hash hash_decl;
type_base::shared_ptr_hash hash_type_ptr;
- std::tr1::hash<size_t> hash_size_t;
+ abg_compat::hash<size_t> hash_size_t;
size_t v = hash_string(typeid(t).name());
v = hashing::combine_hashes(v, hash_decl(t));
size_t
function_decl::hash::operator()(const function_decl& t) const
{
- std::tr1::hash<int> hash_int;
- std::tr1::hash<size_t> hash_size_t;
- std::tr1::hash<bool> hash_bool;
- std::tr1::hash<string> hash_string;
+ abg_compat::hash<int> hash_int;
+ abg_compat::hash<size_t> hash_size_t;
+ abg_compat::hash<bool> hash_bool;
+ abg_compat::hash<string> hash_string;
decl_base::hash hash_decl_base;
type_base::shared_ptr_hash hash_type_ptr;
(const function_decl::parameter& p) const
{
type_base::shared_ptr_hash hash_type_ptr;
- std::tr1::hash<bool> hash_bool;
- std::tr1::hash<unsigned> hash_unsigned;
+ abg_compat::hash<bool> hash_bool;
+ abg_compat::hash<unsigned> hash_unsigned;
size_t v = hash_type_ptr(p.get_type());
v = hashing::combine_hashes(v, hash_unsigned(p.get_index()));
v = hashing::combine_hashes(v, hash_bool(p.get_variadic_marker()));
size_t
operator()(const method_type& t) const
{
- std::tr1::hash<string> hash_string;
+ abg_compat::hash<string> hash_string;
type_base::shared_ptr_hash hash_type_ptr;
function_decl::parameter::hash hash_parameter;
size_t
function_type::hash::operator()(const function_type& t) const
{
- std::tr1::hash<string> hash_string;
+ abg_compat::hash<string> hash_string;
type_base::shared_ptr_hash hash_type_ptr;
function_decl::parameter::hash hash_parameter;
size_t
member_base::hash::operator()(const member_base& m) const
{
- std::tr1::hash<int> hash_int;
+ abg_compat::hash<int> hash_int;
return hash_int(m.get_access_specifier());
}
{
member_base::hash hash_member;
type_base::shared_ptr_hash hash_type_ptr;
- std::tr1::hash<size_t> hash_size;
- std::tr1::hash<bool> hash_bool;
- std::tr1::hash<string> hash_string;
+ abg_compat::hash<size_t> hash_size;
+ abg_compat::hash<bool> hash_bool;
+ abg_compat::hash<string> hash_string;
size_t v = hash_string(typeid(t).name());
v = hashing::combine_hashes(v, hash_member(t));
member_function_template::hash::operator()
(const member_function_template& t) const
{
- std::tr1::hash<bool> hash_bool;
+ abg_compat::hash<bool> hash_bool;
function_tdecl::hash hash_function_tdecl;
member_base::hash hash_member;
- std::tr1::hash<string> hash_string;
+ abg_compat::hash<string> hash_string;
size_t v = hash_member(t);
string n = t.get_qualified_name();
{
member_base::hash hash_member;
class_tdecl::hash hash_class_tdecl;
- std::tr1::hash<string> hash_string;
+ abg_compat::hash<string> hash_string;
size_t v = hash_member(t);
string n = t.get_qualified_name();
ABG_ASSERT(!t.get_is_declaration_only());
- std::tr1::hash<string> hash_string;
+ abg_compat::hash<string> hash_string;
scope_type_decl::hash hash_scope_type;
var_decl::hash hash_data_member;
member_function_template::hash hash_member_fn_tmpl;
ABG_ASSERT(!t.get_is_declaration_only());
- std::tr1::hash<string> hash_string;
+ abg_compat::hash<string> hash_string;
class_decl::base_spec::hash hash_base;
class_or_union::hash hash_class_or_union;
t.set_hashing_has_started(true);
- std::tr1::hash<unsigned> hash_unsigned;
- std::tr1::hash<std::string> hash_string;
+ abg_compat::hash<unsigned> hash_unsigned;
+ abg_compat::hash<std::string> hash_string;
template_decl::hash hash_template_decl;
size_t v = hash_string(typeid(t).name());
size_t
template_decl::hash::operator()(const template_decl& t) const
{
- std::tr1::hash<string> hash_string;
+ abg_compat::hash<string> hash_string;
template_parameter::shared_ptr_hash hash_template_parameter;
size_t v = hash_string(typeid(t).name());
size_t
operator()(const type_tparameter& t) const
{
- std::tr1::hash<string> hash_string;
+ abg_compat::hash<string> hash_string;
template_parameter::hash hash_template_parameter;
type_decl::hash hash_type;
non_type_tparameter::hash::operator()(const non_type_tparameter& t) const
{
template_parameter::hash hash_template_parameter;
- std::tr1::hash<string> hash_string;
+ abg_compat::hash<string> hash_string;
type_base::shared_ptr_hash hash_type;
size_t v = hash_string(typeid(t).name());
size_t
operator()(const template_tparameter& t) const
{
- std::tr1::hash<string> hash_string;
+ abg_compat::hash<string> hash_string;
type_tparameter::hash hash_template_type_parm;
template_decl::hash hash_template_decl;
size_t
type_composition::hash::operator()(const type_composition& t) const
{
- std::tr1::hash<string> hash_string;
+ abg_compat::hash<string> hash_string;
type_base::dynamic_hash hash_type;
size_t v = hash_string(typeid(t).name());
function_tdecl::hash::
operator()(const function_tdecl& t) const
{
- std::tr1::hash<string> hash_string;
+ abg_compat::hash<string> hash_string;
decl_base::hash hash_decl_base;
template_decl::hash hash_template_decl;
function_decl::hash hash_function_decl;
class_tdecl::hash::
operator()(const class_tdecl& t) const
{
- std::tr1::hash<string> hash_string;
+ abg_compat::hash<string> hash_string;
decl_base::hash hash_decl_base;
template_decl::hash hash_template_decl;
class_decl::hash hash_class_decl;
#include <iterator>
#include <typeinfo>
#include <sstream>
-#include <tr1/memory>
-#include <tr1/unordered_map>
+#include "abg-cxx-compat.h"
#include "abg-internal.h"
// <headers defining libabigail's API go under here>
ABG_BEGIN_EXPORT_DECLARATIONS
using std::string;
using std::list;
using std::vector;
-using std::tr1::unordered_map;
-using std::tr1::dynamic_pointer_cast;
-using std::tr1::static_pointer_cast;
+using abg_compat::unordered_map;
+using abg_compat::dynamic_pointer_cast;
+using abg_compat::static_pointer_cast;
/// Convenience typedef for a map of string -> string*.
typedef unordered_map<string, string*> pool_map_type;
///@return true iff the current elf_symbol has an alias.
bool
elf_symbol::has_aliases() const
-{return get_next_alias();}
+{return bool(get_next_alias());}
/// Get the number of aliases to this elf symbol
///
elf_symbol::has_other_common_instances() const
{
ABG_ASSERT(is_common_symbol());
- return get_next_common_instance();
+ return bool(get_next_common_instance());
}
/// Get the next common instance of the current common symbol.
{
bool are_equal = textually_equals(*this, other);
if (!are_equal)
- are_equal = get_alias_which_equals(other);
+ are_equal = bool(get_alias_which_equals(other));
return are_equal;
}
ABG_ASSERT(v->get_type());
size_t h = hash_type_or_decl(v->get_type());
string repr = v->get_pretty_representation();
- std::tr1::hash<string> hash_string;
+ abg_compat::hash<string> hash_string;
h = hashing::combine_hashes(h, hash_string(repr));
result = h;
}
ABG_ASSERT(f->get_type());
size_t h = hash_type_or_decl(f->get_type());
string repr = f->get_pretty_representation();
- std::tr1::hash<string> hash_string;
+ abg_compat::hash<string> hash_string;
h = hashing::combine_hashes(h, hash_string(repr));
result = h;
}
{
type_base_sptr parm_type = p->get_type();
ABG_ASSERT(parm_type);
- std::tr1::hash<bool> hash_bool;
- std::tr1::hash<unsigned> hash_unsigned;
+ abg_compat::hash<bool> hash_bool;
+ abg_compat::hash<unsigned> hash_unsigned;
size_t h = hash_type_or_decl(parm_type);
h = hashing::combine_hashes(h, hash_unsigned(p->get_index()));
h = hashing::combine_hashes(h, hash_bool(p->get_variadic_marker()));
else if (class_decl::base_spec *bs = is_class_base_spec(d))
{
member_base::hash hash_member;
- std::tr1::hash<size_t> hash_size;
- std::tr1::hash<bool> hash_bool;
+ abg_compat::hash<size_t> hash_size;
+ abg_compat::hash<bool> hash_bool;
type_base_sptr type = bs->get_base_class();
size_t h = hash_type_or_decl(type);
h = hashing::combine_hashes(h, hash_member(*bs));
#include <cstring>
#include <cstdlib>
#include <cerrno>
-#include <tr1/unordered_map>
#include <deque>
#include <assert.h>
#include <sstream>
#include <libxml/xmlstring.h>
#include <libxml/xmlreader.h>
+#include "abg-cxx-compat.h"
#include "abg-suppression-priv.h"
#include "abg-internal.h"
{
using std::string;
using std::deque;
-using std::tr1::shared_ptr;
-using std::tr1::unordered_map;
-using std::tr1::dynamic_pointer_cast;
+using abg_compat::shared_ptr;
+using abg_compat::unordered_map;
+using abg_compat::dynamic_pointer_cast;
using std::vector;
using std::istream;
#ifdef WITH_ZIP_ARCHIVE
if (d)
return (ir::get_translation_unit(d) == get_translation_unit());
else if (function_type_sptr fn_type = is_function_type(type))
- return lookup_function_type(fn_type, *get_translation_unit());
+ return bool(lookup_function_type(fn_type, *get_translation_unit()));
else
return false;
}
do
{
translation_unit_sptr tu = read_translation_unit_from_input(ctxt);
- is_ok = tu;
+ is_ok = bool(tu);
}
while (is_ok);
ctxt.set_corpus_node(node);
- typedef std::tr1::unordered_map<xmlNodePtr, elf_symbol_sptr>
+ typedef abg_compat::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;
/// This contains the implementation of the suppression engine of
/// libabigail.
-#include "abg-internal.h"
#include <algorithm>
+#include "abg-cxx-compat.h"
+#include "abg-internal.h"
// <headers defining libabigail's API go under here>
ABG_BEGIN_EXPORT_DECLARATIONS
namespace suppr
{
-using std::tr1::dynamic_pointer_cast;
+using abg_compat::dynamic_pointer_cast;
// <suppression_base stuff>
#include "abg-dwarf-reader.h"
#include "abg-internal.h"
+#include "abg-cxx-compat.h"
// <headers defining libabigail's API go under here>
ABG_BEGIN_EXPORT_DECLARATIONS
/// @param p the path to turn into an absolute path.
///
/// @return a shared pointer to the resulting absolute path.
-std::tr1::shared_ptr<char>
+abg_compat::shared_ptr<char>
make_path_absolute(const char*p)
{
- using std::tr1::shared_ptr;
+ using abg_compat::shared_ptr;
shared_ptr<char> result;
#include <vector>
#include <stack>
#include <algorithm>
-#include <tr1/unordered_map>
+#include "abg-cxx-compat.h"
#include "abg-tools-utils.h"
#include "abg-internal.h"
namespace abigail
{
using std::cerr;
-using std::tr1::shared_ptr;
-using std::tr1::dynamic_pointer_cast;
-using std::tr1::static_pointer_cast;
+using abg_compat::shared_ptr;
+using abg_compat::dynamic_pointer_cast;
+using abg_compat::static_pointer_cast;
using std::ofstream;
using std::ostream;
using std::ostringstream;
using std::list;
using std::vector;
using std::stack;
-using std::tr1::unordered_map;
+using abg_compat::unordered_map;
using abigail::sptr_utils::noop_deleter;
#if WITH_ZIP_ARCHIVE
main()
{
using std::vector;
- using std::tr1::dynamic_pointer_cast;
+ using abg_compat::dynamic_pointer_cast;
using abigail::workers::queue;
using abigail::workers::task;
using abigail::workers::task_sptr;
main()
{
using std::vector;
- using std::tr1::dynamic_pointer_cast;
+ using abg_compat::dynamic_pointer_cast;
using abigail::workers::queue;
using abigail::workers::task;
using abigail::workers::task_sptr;
using std::string;
using std::ofstream;
using std::cerr;
-using std::tr1::dynamic_pointer_cast;
+using abg_compat::dynamic_pointer_cast;
using abigail::tests::get_build_dir;
using abigail::dwarf_reader::read_corpus_from_elf;
using abigail::dwarf_reader::read_context;
#include <cstdlib>
#include <cstring>
#include <vector>
+#include "abg-cxx-compat.h"
#include "abg-ir.h"
#include "abg-reader.h"
#include "abg-writer.h"
using std::ofstream;
using std::cerr;
-using std::tr1::dynamic_pointer_cast;
+using abg_compat::dynamic_pointer_cast;
using abigail::tools_utils::file_type;
using abigail::tools_utils::check_file;
main()
{
using std::vector;
- using std::tr1::dynamic_pointer_cast;
+ using abg_compat::dynamic_pointer_cast;
using abigail::workers::queue;
using abigail::workers::task;
using abigail::workers::task_sptr;
using std::string;
using std::cerr;
using std::ofstream;
-using std::tr1::shared_ptr;
+using abg_compat::shared_ptr;
using abigail::corpus;
using abigail::corpus_sptr;
using abigail::translation_unit;
#include <string>
#include <iostream>
#include <fstream>
-#include <tr1/memory>
+#include "abg-cxx-compat.h"
#include "abg-config.h"
#include "abg-tools-utils.h"
#include "abg-corpus.h"
using std::ostream;
using std::ofstream;
using std::vector;
-using std::tr1::shared_ptr;
+using abg_compat::shared_ptr;
using abigail::tools_utils::emit_prefix;
using std::ostream;
using std::cout;
using std::cerr;
-using std::tr1::shared_ptr;
+using abg_compat::shared_ptr;
using abigail::ir::environment;
using abigail::ir::environment_sptr;
using abigail::translation_unit;
#include <iostream>
#include <fstream>
#include <vector>
-#include <tr1/memory>
+#include "abg-cxx-compat.h"
#include "abg-config.h"
#include "abg-tools-utils.h"
#include "abg-corpus.h"
using std::ostream;
using std::ofstream;
using std::vector;
-using std::tr1::shared_ptr;
+using abg_compat::shared_ptr;
using abigail::tools_utils::emit_prefix;
using abigail::tools_utils::temp_file;
using abigail::tools_utils::temp_file_sptr;
#include <iostream>
#include <fstream>
#include <vector>
+#include "abg-cxx-compat.h"
#include "abg-config.h"
#include "abg-tools-utils.h"
#include "abg-ir.h"
bool read_tu;
bool diff;
bool noout;
- std::tr1::shared_ptr<char> di_root_path;
+ abg_compat::shared_ptr<char> di_root_path;
vector<string> suppression_paths;
string headers_dir;
#include <vector>
#include <algorithm>
#include <map>
-#include <tr1/unordered_set>
+#include "abg-cxx-compat.h"
#include "abg-workers.h"
#include "abg-config.h"
#include "abg-tools-utils.h"
using std::ostream;
using std::vector;
using std::map;
-using std::tr1::unordered_set;
+using abg_compat::unordered_set;
using std::set;
using std::ostringstream;
-using std::tr1::shared_ptr;
-using std::tr1::dynamic_pointer_cast;
+using abg_compat::shared_ptr;
+using abg_compat::dynamic_pointer_cast;
using abigail::workers::task;
using abigail::workers::task_sptr;
using abigail::workers::queue;
pkg.private_types_suppressions().push_back(suppr);
}
- return suppr;
+ return bool(suppr);
}
/// If the user wants to avoid comparing DSOs that are private to this