aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/src
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/src')
-rw-r--r--libstdc++-v3/src/Makefile.am1
-rw-r--r--libstdc++-v3/src/Makefile.in20
-rw-r--r--libstdc++-v3/src/throw_allocator.cc95
3 files changed, 9 insertions, 107 deletions
diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am
index 288243a..d218cea 100644
--- a/libstdc++-v3/src/Makefile.am
+++ b/libstdc++-v3/src/Makefile.am
@@ -182,7 +182,6 @@ sources = \
streambuf-inst.cc \
streambuf.cc \
string-inst.cc \
- throw_allocator.cc \
valarray-inst.cc \
wlocale-inst.cc \
wstring-inst.cc \
diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in
index 24187af..9ee5275 100644
--- a/libstdc++-v3/src/Makefile.in
+++ b/libstdc++-v3/src/Makefile.in
@@ -85,13 +85,12 @@ am__libstdc___la_SOURCES_DIST = atomic.cc bitmap_allocator.cc \
fstream-inst.cc ext-inst.cc ios-inst.cc iostream-inst.cc \
istream-inst.cc istream.cc locale-inst.cc misc-inst.cc \
ostream-inst.cc sstream-inst.cc streambuf-inst.cc streambuf.cc \
- string-inst.cc throw_allocator.cc valarray-inst.cc \
- wlocale-inst.cc wstring-inst.cc mutex.cc condition_variable.cc \
- chrono.cc thread.cc atomicity.cc codecvt_members.cc \
- collate_members.cc ctype_members.cc messages_members.cc \
- monetary_members.cc numeric_members.cc time_members.cc \
- basic_file.cc c++locale.cc compatibility-ldbl.cc \
- parallel_list.cc parallel_settings.cc
+ string-inst.cc valarray-inst.cc wlocale-inst.cc \
+ wstring-inst.cc mutex.cc condition_variable.cc chrono.cc \
+ thread.cc atomicity.cc codecvt_members.cc collate_members.cc \
+ ctype_members.cc messages_members.cc monetary_members.cc \
+ numeric_members.cc time_members.cc basic_file.cc c++locale.cc \
+ compatibility-ldbl.cc parallel_list.cc parallel_settings.cc
am__objects_1 = atomicity.lo codecvt_members.lo collate_members.lo \
ctype_members.lo messages_members.lo monetary_members.lo \
numeric_members.lo time_members.lo
@@ -112,9 +111,9 @@ am__objects_5 = atomic.lo bitmap_allocator.lo pool_allocator.lo \
fstream-inst.lo ext-inst.lo ios-inst.lo iostream-inst.lo \
istream-inst.lo istream.lo locale-inst.lo misc-inst.lo \
ostream-inst.lo sstream-inst.lo streambuf-inst.lo streambuf.lo \
- string-inst.lo throw_allocator.lo valarray-inst.lo \
- wlocale-inst.lo wstring-inst.lo mutex.lo condition_variable.lo \
- chrono.lo thread.lo $(am__objects_1) $(am__objects_4)
+ string-inst.lo valarray-inst.lo wlocale-inst.lo \
+ wstring-inst.lo mutex.lo condition_variable.lo chrono.lo \
+ thread.lo $(am__objects_1) $(am__objects_4)
am_libstdc___la_OBJECTS = $(am__objects_5)
libstdc___la_OBJECTS = $(am_libstdc___la_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
@@ -435,7 +434,6 @@ sources = \
streambuf-inst.cc \
streambuf.cc \
string-inst.cc \
- throw_allocator.cc \
valarray-inst.cc \
wlocale-inst.cc \
wstring-inst.cc \
diff --git a/libstdc++-v3/src/throw_allocator.cc b/libstdc++-v3/src/throw_allocator.cc
index a8247ad..e69de29 100644
--- a/libstdc++-v3/src/throw_allocator.cc
+++ b/libstdc++-v3/src/throw_allocator.cc
@@ -1,95 +0,0 @@
-// Throw Allocator. Out of line function definitions. -*- C++ -*-
-
-// Copyright (C) 2009 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, 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 Public License for more details.
-
-// Under Section 7 of GPL version 3, you are granted additional
-// permissions described in the GCC Runtime Library Exception, version
-// 3.1, as published by the Free Software Foundation.
-
-// You should have received a copy of the GNU General Public License and
-// a copy of the GCC Runtime Library Exception along with this program;
-// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
-// <http://www.gnu.org/licenses/>.
-
-#include <ext/throw_allocator.h>
-
-_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
-
- void
- throw_allocator_base::do_check_allocated(const_iterator found,
- const_iterator end,
- void* p, size_t size)
- {
- if (found == end)
- {
- std::string error("throw_allocator_base::check_allocated by value "
- "null erase!\n");
- print_to_string(error, make_entry(p, size));
- std::__throw_logic_error(error.c_str());
- }
-
- if (found->second.second != size)
- {
- std::string error("throw_allocator_base::check_allocated by value "
- "wrong-size erase!\n");
- print_to_string(error, make_entry(p, size));
- print_to_string(error, *found);
- std::__throw_logic_error(error.c_str());
- }
- }
-
- void
- throw_allocator_base::do_check_allocated(const_iterator beg,
- const_iterator end,
- size_t label)
- {
- std::string found;
- while (beg != end)
- {
- if (beg->second.first == label)
- print_to_string(found, *beg);
- ++beg;
- }
-
- if (!found.empty())
- {
- std::string error("throw_allocator_base::check_allocated by label \n");
- error += found;
- std::__throw_logic_error(error.c_str());
- }
- }
-
- void
- throw_allocator_base::print_to_string(std::string& s,
- const_reference ref)
- {
- char buf[40];
- const char tab('\t');
- s += "address: ";
- __builtin_sprintf(buf, "%p", ref.first);
- s += buf;
- s += tab;
- s += "label: ";
- unsigned long l = static_cast<unsigned long>(ref.second.first);
- __builtin_sprintf(buf, "%lu", l);
- s += buf;
- s += tab;
- s += "size: ";
- l = static_cast<unsigned long>(ref.second.second);
- __builtin_sprintf(buf, "%lu", l);
- s += buf;
- s += '\n';
- }
-
-_GLIBCXX_END_NAMESPACE