2004-05-13 14:50:53 +02:00
|
|
|
// -*- C++ -*-
|
|
|
|
|
2014-01-02 23:30:10 +01:00
|
|
|
// Copyright (C) 2004-2014 Free Software Foundation, Inc.
|
2004-05-13 14:50:53 +02:00
|
|
|
|
|
|
|
// This library is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU General Public License as
|
2009-04-09 17:00:19 +02:00
|
|
|
// published by the Free Software Foundation; either version 3, or (at
|
2004-05-13 14:50:53 +02:00
|
|
|
// 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 Public License for more details.
|
|
|
|
|
|
|
|
// You should have received a copy of the GNU General Public License
|
2009-04-09 17:00:19 +02:00
|
|
|
// along with this library; see the file COPYING3. If not see
|
|
|
|
// <http://www.gnu.org/licenses/>.
|
|
|
|
|
2004-05-13 14:50:53 +02:00
|
|
|
// Benjamin Kosnik <bkoz@redhat.com>
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <stdexcept>
|
2008-03-26 23:29:13 +01:00
|
|
|
#include <vector>
|
locale_facets.h (class collate, [...]): Move...
2007-04-24 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.h (class collate, class collate_byname):
Move...
* include/bits/locale_classes.h: ... here.
* include/bits/locale_facets.tcc (locale::combine, locale::operator(),
has_facet, use_facet, collate::_M_compare, collate::_M_transform,
collate::do_compare, collate::do_transform, collate::do_hash): Move...
* include/bits/locale_classes.tcc: ... here, new.
* include/Makefile.am: Add.
* testsuite/util/testsuite_abi.h: Include <locale>.
* include/std/locale: Tweak.
* include/std/istream: Likewise.
* include/std/ostream: Likewise.
* include/bits/codecvt.h: Likewise.
* include/Makefile.in: Regenerate.
* include/bits/codecvt.h: Adjust extern template declarations.
* include/bits/ostream_insert.h: Likewise.
* include/bits/ostream.tcc: Likewise.
* include/bits/locale_facets.h: Do not include <bits/codecvt.h>.
* include/std/fstream: Do it here.
* include/bits/locale_facets_nonio.h: Likewise.
From-SVN: r124114
2007-04-24 20:57:12 +02:00
|
|
|
#include <locale>
|
Convert ext/hash_map, set to tr1/functional, tr1/unordered_map, set.
2007-10-11 Benjamin Kosnik <bkoz@redhat.com>
Convert ext/hash_map, set to tr1/functional, tr1/unordered_map, set.
* include/ext/rope: Use tr1/functional hash instead of ext/hash_fun.h.
* include/ext/pb_ds/detail/standard_policies.hpp: Same.
* include/precompiled/extc++.h: Remove hash_map, hash_set.
* testsuite/util/testsuite_abi.h (__gnu_cxx): Use unordered_map
instead of hash_map. Remove hash specialization for string.
* testsuite/util/testsuite_abi.cc: Include <vector>.
* testsuite/util/native_type/assoc/native_hash_set.hpp: Remove
hash_set code.
* testsuite/util/native_type/assoc/native_hash_map.hpp: Remove
hash_map code.
* testsuite/util/native_type/assoc/native_hash_multimap.hpp:
Change hash_multimap to unordered_multimap.
* testsuite/util/testsuite_common_types.h: Remove hash_map, hash_set.
* testsuite/ext/headers.cc: Same.
* testsuite/17_intro/headers/all_c++200x_compatibility.cc: Remove
hash_map.h, hash_set.h.
* testsuite/17_intro/headers/all.cc: Same.
* testsuite/17_intro/headers/all_pedantic_errors.cc: Same.
* include/ext/pb_ds/detail/standard_policies.hpp: Format.
* testsuite/util/native_type/assoc/native_set.hpp: Same,
update comment.
* testsuite/util/native_type/assoc/native_map.hpp: Same.
* testsuite/util/native_type/assoc/native_multimap.hpp: Same.
* testsuite/util/performance/assoc/timing/
multimap_insert_test.hpp: Same.
* testsuite/util/performance/assoc/timing/multimap_find_test.hpp: Same.
From-SVN: r129243
2007-10-11 23:48:54 +02:00
|
|
|
#include <tr1/unordered_map>
|
2004-05-13 14:50:53 +02:00
|
|
|
#include <cxxabi.h>
|
|
|
|
|
|
|
|
// Encapsulates symbol characteristics.
|
|
|
|
struct symbol
|
|
|
|
{
|
2010-10-01 19:10:38 +02:00
|
|
|
enum category { function, object, tls, uncategorized };
|
2005-06-17 09:33:56 +02:00
|
|
|
enum designation { existing, added, subtracted, undesignated };
|
|
|
|
enum version { none, compatible, incompatible, unversioned };
|
2004-05-13 14:50:53 +02:00
|
|
|
enum compatibility
|
|
|
|
{
|
|
|
|
compat_type = 1,
|
|
|
|
compat_name = 2,
|
|
|
|
compat_size = 4,
|
|
|
|
compat_version = 8
|
|
|
|
};
|
|
|
|
|
|
|
|
category type;
|
|
|
|
std::string name;
|
2005-06-17 09:33:56 +02:00
|
|
|
std::string raw_name; // Name with versioning info still attached.
|
2004-05-13 14:50:53 +02:00
|
|
|
std::string demangled_name;
|
|
|
|
int size;
|
|
|
|
std::string version_name;
|
2005-06-17 09:33:56 +02:00
|
|
|
version version_status;
|
2004-05-13 14:50:53 +02:00
|
|
|
designation status;
|
|
|
|
|
2005-06-17 09:33:56 +02:00
|
|
|
symbol()
|
|
|
|
: type(uncategorized), size(0), version_status(unversioned),
|
|
|
|
status(undesignated) { }
|
2004-05-13 14:50:53 +02:00
|
|
|
|
|
|
|
symbol(const symbol& other)
|
|
|
|
: type(other.type), name(other.name), demangled_name(other.demangled_name),
|
2005-06-17 09:33:56 +02:00
|
|
|
size(other.size), version_name(other.version_name),
|
|
|
|
version_status(other.version_status), status(other.status) { }
|
2004-05-13 14:50:53 +02:00
|
|
|
|
|
|
|
void
|
|
|
|
print() const;
|
|
|
|
|
|
|
|
void
|
|
|
|
init(std::string& data);
|
|
|
|
};
|
|
|
|
|
2008-03-26 23:29:13 +01:00
|
|
|
// Map type between symbol names and full symbol info.
|
|
|
|
typedef std::tr1::unordered_map<std::string, symbol> symbols;
|
2004-05-13 14:50:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
// Check.
|
|
|
|
bool
|
2005-06-17 09:33:56 +02:00
|
|
|
check_version(symbol& test, bool added = false);
|
2004-05-13 14:50:53 +02:00
|
|
|
|
|
|
|
bool
|
2005-06-17 09:33:56 +02:00
|
|
|
check_compatible(symbol& lhs, symbol& rhs, bool verbose = false);
|
2004-05-13 14:50:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
// Examine.
|
|
|
|
bool
|
|
|
|
has_symbol(const std::string& mangled, const symbols& list) throw();
|
|
|
|
|
2008-03-26 23:29:13 +01:00
|
|
|
const symbol&
|
2004-05-13 14:50:53 +02:00
|
|
|
get_symbol(const std::string& mangled, const symbols& list);
|
|
|
|
|
|
|
|
extern "C" void
|
|
|
|
examine_symbol(const char* name, const char* file);
|
|
|
|
|
2005-04-01 22:20:22 +02:00
|
|
|
extern "C" int
|
2004-05-13 14:50:53 +02:00
|
|
|
compare_symbols(const char* baseline_file, const char* test_file, bool verb);
|
|
|
|
|
|
|
|
|
|
|
|
// Util.
|
|
|
|
symbols
|
|
|
|
create_symbols(const char* file);
|
|
|
|
|
|
|
|
const char*
|
|
|
|
demangle(const std::string& mangled);
|