summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Dionne <ldionne@apple.com>2018-11-29 19:44:57 +0000
committerLouis Dionne <ldionne@apple.com>2018-11-29 19:44:57 +0000
commitb9a9b3217a649ad58ae4cb39e7e75a6bd7a8c4c5 (patch)
treeba2a9182e0b5f0968b36f3671238b74055a1b100
parent52e176178d49888655fc386d2612fe19d42f16bd (diff)
[libcxx] Remove bad_array_length
Summary: std::bad_array_length was added by n3467, but this never made it into C++. This commit removes the definition of std::bad_array_length from the headers AND from the shared library. See the comments in the ABI changelog for details about the ABI implications of this change. Reviewers: mclow.lists, dexonsmith, howard.hinnant, EricWF Subscribers: christof, jkorous, libcxx-commits Differential Revision: https://reviews.llvm.org/D54804
-rw-r--r--libcxx/docs/ReleaseNotes.rst8
-rw-r--r--libcxx/include/__config2
-rw-r--r--libcxx/include/new35
-rw-r--r--libcxx/lib/abi/CHANGELOG.TXT29
-rw-r--r--libcxx/lib/abi/x86_64-apple-darwin.v1.abilist18
-rw-r--r--libcxx/lib/abi/x86_64-apple-darwin.v2.abilist18
-rw-r--r--libcxx/lib/libc++abi2.exp10
-rw-r--r--libcxx/src/support/runtime/exception_fallback.ipp16
-rw-r--r--libcxx/src/support/runtime/exception_glibcxx.ipp5
-rw-r--r--libcxx/src/support/runtime/exception_libcxxrt.ipp15
-rw-r--r--libcxx/src/support/runtime/exception_msvc.ipp14
-rw-r--r--libcxx/test/libcxx/language.support/support.dynamic/alloc.errors/new.badlength/bad_array_length.pass.cpp37
-rw-r--r--libcxxabi/src/stdlib_exception.cpp30
13 files changed, 37 insertions, 200 deletions
diff --git a/libcxx/docs/ReleaseNotes.rst b/libcxx/docs/ReleaseNotes.rst
index b7ad2e2a82c..20be9f627ef 100644
--- a/libcxx/docs/ReleaseNotes.rst
+++ b/libcxx/docs/ReleaseNotes.rst
@@ -52,3 +52,11 @@ API Changes
std::dynarray was a feature proposed for C++14 that was pulled from the
Standard at the last minute and was never standardized. Since there are no
plans to standardize this facility it is being removed.
+- Starting with LLVM 8.0.0, std::bad_array_length has been removed from the
+ library. std::bad_array_length was a feature proposed for C++14 alongside
+ std::dynarray, but it never actually made it into the C++ Standard. There
+ are no plans to standardize this feature at this time. Formally speaking,
+ this removal constitutes an ABI break because the symbols were shipped in
+ the shared library. However, on macOS systems, the feature was not usable
+ because it was hidden behind availability annotations. We do not expect
+ any actual breakage to happen from this change.
diff --git a/libcxx/include/__config b/libcxx/include/__config
index e343ad53427..ef69bf4957e 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -1310,7 +1310,6 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
__attribute__((availability(watchos,strict,introduced=5.0)))
# define _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS \
_LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS
-# define _LIBCPP_AVAILABILITY_BAD_ARRAY_LENGTH __attribute__((unavailable))
# define _LIBCPP_AVAILABILITY_BAD_ANY_CAST \
_LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS
# define _LIBCPP_AVAILABILITY_UNCAUGHT_EXCEPTIONS \
@@ -1338,7 +1337,6 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
# define _LIBCPP_AVAILABILITY_SHARED_MUTEX
# define _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS
# define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS
-# define _LIBCPP_AVAILABILITY_BAD_ARRAY_LENGTH
# define _LIBCPP_AVAILABILITY_BAD_ANY_CAST
# define _LIBCPP_AVAILABILITY_UNCAUGHT_EXCEPTIONS
# define _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE
diff --git a/libcxx/include/new b/libcxx/include/new
index 412d51bd027..24ffcad5a6b 100644
--- a/libcxx/include/new
+++ b/libcxx/include/new
@@ -27,12 +27,6 @@ public:
virtual const char* what() const noexcept;
};
-class bad_array_length : public bad_alloc // FIXME: Not part of C++
-{
-public:
- bad_array_length() noexcept;
-};
-
class bad_array_new_length : public bad_alloc // C++14
{
public:
@@ -156,20 +150,6 @@ _LIBCPP_FUNC_VIS new_handler get_new_handler() _NOEXCEPT;
_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void __throw_bad_alloc(); // not in C++ spec
-#if defined(_LIBCPP_BUILDING_LIBRARY) || (_LIBCPP_STD_VER > 11)
-
-class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_ARRAY_LENGTH
- bad_array_length : public bad_alloc {
-public:
- bad_array_length() _NOEXCEPT;
- virtual ~bad_array_length() _NOEXCEPT;
- virtual const char* what() const _NOEXCEPT;
-};
-
-#define _LIBCPP_BAD_ARRAY_LENGTH_DEFINED
-
-#endif // defined(_LIBCPP_BUILDING_LIBRARY) || (_LIBCPP_STD_VER > 11)
-
#if !defined(_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION) && \
!defined(_LIBCPP_DEFER_NEW_TO_VCRUNTIME)
#ifndef _LIBCPP_CXX03_LANG
@@ -350,21 +330,6 @@ inline _LIBCPP_INLINE_VISIBILITY void __libcpp_deallocate_unsized(void* __ptr, s
_DeallocateCaller::__do_deallocate_handle_align(__ptr, __align);
}
-#ifdef _LIBCPP_BAD_ARRAY_LENGTH_DEFINED
-_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
-#ifndef _LIBCPP_NO_EXCEPTIONS
-_LIBCPP_AVAILABILITY_BAD_ARRAY_LENGTH
-#endif
-void __throw_bad_array_length()
-{
-#ifndef _LIBCPP_NO_EXCEPTIONS
- throw bad_array_length();
-#else
- _VSTD::abort();
-#endif
-}
-#endif
-
template <class _Tp>
_LIBCPP_NODISCARD_AFTER_CXX17 inline
_LIBCPP_CONSTEXPR _Tp* __launder(_Tp* __p) _NOEXCEPT
diff --git a/libcxx/lib/abi/CHANGELOG.TXT b/libcxx/lib/abi/CHANGELOG.TXT
index 13ec8d307f2..38dffd2908b 100644
--- a/libcxx/lib/abi/CHANGELOG.TXT
+++ b/libcxx/lib/abi/CHANGELOG.TXT
@@ -16,6 +16,35 @@ New entries should be added directly below the "Version" header.
Version 8.0
-----------
+* rXXXXX - Remove std::bad_array_length
+
+ The change removes the definition of std::bad_array_length (which never made
+ it into the standard) from the headers and the dylib. This is technically an
+ ABI break because the symbols are shipped starting with mac OSX 10.13, however
+ users couldn't be relying on the functionality because it is marked as being
+ unavailable using Clang's availability attribute.
+
+ x86_64-apple-darwin16.0
+ -----------------------
+ Symbol removed: __ZNKSt16bad_array_length4whatEv
+ Symbol removed: __ZNKSt16bad_array_length4whatEv
+ Symbol removed: __ZNSt16bad_array_lengthC1Ev
+ Symbol removed: __ZNSt16bad_array_lengthC1Ev
+ Symbol removed: __ZNSt16bad_array_lengthC2Ev
+ Symbol removed: __ZNSt16bad_array_lengthC2Ev
+ Symbol removed: __ZNSt16bad_array_lengthD0Ev
+ Symbol removed: __ZNSt16bad_array_lengthD0Ev
+ Symbol removed: __ZNSt16bad_array_lengthD1Ev
+ Symbol removed: __ZNSt16bad_array_lengthD1Ev
+ Symbol removed: __ZNSt16bad_array_lengthD2Ev
+ Symbol removed: __ZNSt16bad_array_lengthD2Ev
+ Symbol removed: __ZTISt16bad_array_length
+ Symbol removed: __ZTISt16bad_array_length
+ Symbol removed: __ZTSSt16bad_array_length
+ Symbol removed: __ZTSSt16bad_array_length
+ Symbol removed: __ZTVSt16bad_array_length
+ Symbol removed: __ZTVSt16bad_array_length
+
* r347395 - Making libc++ build under -fvisibility=hidden on Linux
The change marks several function templates as hidden. This removes symbols
diff --git a/libcxx/lib/abi/x86_64-apple-darwin.v1.abilist b/libcxx/lib/abi/x86_64-apple-darwin.v1.abilist
index 88cfa90f1a3..65a03496134 100644
--- a/libcxx/lib/abi/x86_64-apple-darwin.v1.abilist
+++ b/libcxx/lib/abi/x86_64-apple-darwin.v1.abilist
@@ -8,8 +8,6 @@
{'type': 'I', 'is_defined': True, 'name': '__ZNKSt13bad_exception4whatEv'}
{'type': 'U', 'is_defined': False, 'name': '__ZNKSt13runtime_error4whatEv'}
{'type': 'I', 'is_defined': True, 'name': '__ZNKSt13runtime_error4whatEv'}
-{'type': 'U', 'is_defined': False, 'name': '__ZNKSt16bad_array_length4whatEv'}
-{'type': 'I', 'is_defined': True, 'name': '__ZNKSt16bad_array_length4whatEv'}
{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt16nested_exception14rethrow_nestedEv'}
{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt18bad_variant_access4whatEv'}
{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt19bad_optional_access4whatEv'}
@@ -527,16 +525,6 @@
{'type': 'I', 'is_defined': True, 'name': '__ZNSt15underflow_errorD1Ev'}
{'type': 'U', 'is_defined': False, 'name': '__ZNSt15underflow_errorD2Ev'}
{'type': 'I', 'is_defined': True, 'name': '__ZNSt15underflow_errorD2Ev'}
-{'type': 'U', 'is_defined': False, 'name': '__ZNSt16bad_array_lengthC1Ev'}
-{'type': 'I', 'is_defined': True, 'name': '__ZNSt16bad_array_lengthC1Ev'}
-{'type': 'U', 'is_defined': False, 'name': '__ZNSt16bad_array_lengthC2Ev'}
-{'type': 'I', 'is_defined': True, 'name': '__ZNSt16bad_array_lengthC2Ev'}
-{'type': 'U', 'is_defined': False, 'name': '__ZNSt16bad_array_lengthD0Ev'}
-{'type': 'I', 'is_defined': True, 'name': '__ZNSt16bad_array_lengthD0Ev'}
-{'type': 'U', 'is_defined': False, 'name': '__ZNSt16bad_array_lengthD1Ev'}
-{'type': 'I', 'is_defined': True, 'name': '__ZNSt16bad_array_lengthD1Ev'}
-{'type': 'U', 'is_defined': False, 'name': '__ZNSt16bad_array_lengthD2Ev'}
-{'type': 'I', 'is_defined': True, 'name': '__ZNSt16bad_array_lengthD2Ev'}
{'type': 'U', 'is_defined': False, 'name': '__ZNSt16invalid_argumentD0Ev'}
{'type': 'I', 'is_defined': True, 'name': '__ZNSt16invalid_argumentD0Ev'}
{'type': 'U', 'is_defined': False, 'name': '__ZNSt16invalid_argumentD1Ev'}
@@ -1804,8 +1792,6 @@
{'type': 'I', 'is_defined': True, 'name': '__ZTISt14overflow_error'}
{'type': 'U', 'is_defined': False, 'name': '__ZTISt15underflow_error'}
{'type': 'I', 'is_defined': True, 'name': '__ZTISt15underflow_error'}
-{'type': 'U', 'is_defined': False, 'name': '__ZTISt16bad_array_length'}
-{'type': 'I', 'is_defined': True, 'name': '__ZTISt16bad_array_length'}
{'type': 'U', 'is_defined': False, 'name': '__ZTISt16invalid_argument'}
{'type': 'I', 'is_defined': True, 'name': '__ZTISt16invalid_argument'}
{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTISt16nested_exception', 'size': 0}
@@ -2059,8 +2045,6 @@
{'type': 'I', 'is_defined': True, 'name': '__ZTSSt14overflow_error'}
{'type': 'U', 'is_defined': False, 'name': '__ZTSSt15underflow_error'}
{'type': 'I', 'is_defined': True, 'name': '__ZTSSt15underflow_error'}
-{'type': 'U', 'is_defined': False, 'name': '__ZTSSt16bad_array_length'}
-{'type': 'I', 'is_defined': True, 'name': '__ZTSSt16bad_array_length'}
{'type': 'U', 'is_defined': False, 'name': '__ZTSSt16invalid_argument'}
{'type': 'I', 'is_defined': True, 'name': '__ZTSSt16invalid_argument'}
{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSSt16nested_exception', 'size': 0}
@@ -2251,8 +2235,6 @@
{'type': 'I', 'is_defined': True, 'name': '__ZTVSt14overflow_error'}
{'type': 'U', 'is_defined': False, 'name': '__ZTVSt15underflow_error'}
{'type': 'I', 'is_defined': True, 'name': '__ZTVSt15underflow_error'}
-{'type': 'U', 'is_defined': False, 'name': '__ZTVSt16bad_array_length'}
-{'type': 'I', 'is_defined': True, 'name': '__ZTVSt16bad_array_length'}
{'type': 'U', 'is_defined': False, 'name': '__ZTVSt16invalid_argument'}
{'type': 'I', 'is_defined': True, 'name': '__ZTVSt16invalid_argument'}
{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVSt16nested_exception', 'size': 0}
diff --git a/libcxx/lib/abi/x86_64-apple-darwin.v2.abilist b/libcxx/lib/abi/x86_64-apple-darwin.v2.abilist
index 3896b38d906..5880a3bfd4f 100644
--- a/libcxx/lib/abi/x86_64-apple-darwin.v2.abilist
+++ b/libcxx/lib/abi/x86_64-apple-darwin.v2.abilist
@@ -8,8 +8,6 @@
{'type': 'I', 'is_defined': True, 'name': '__ZNKSt13bad_exception4whatEv'}
{'type': 'U', 'is_defined': False, 'name': '__ZNKSt13runtime_error4whatEv'}
{'type': 'I', 'is_defined': True, 'name': '__ZNKSt13runtime_error4whatEv'}
-{'type': 'U', 'is_defined': False, 'name': '__ZNKSt16bad_array_length4whatEv'}
-{'type': 'I', 'is_defined': True, 'name': '__ZNKSt16bad_array_length4whatEv'}
{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt16nested_exception14rethrow_nestedEv'}
{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt18bad_variant_access4whatEv'}
{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt19bad_optional_access4whatEv'}
@@ -530,16 +528,6 @@
{'type': 'I', 'is_defined': True, 'name': '__ZNSt15underflow_errorD1Ev'}
{'type': 'U', 'is_defined': False, 'name': '__ZNSt15underflow_errorD2Ev'}
{'type': 'I', 'is_defined': True, 'name': '__ZNSt15underflow_errorD2Ev'}
-{'type': 'U', 'is_defined': False, 'name': '__ZNSt16bad_array_lengthC1Ev'}
-{'type': 'I', 'is_defined': True, 'name': '__ZNSt16bad_array_lengthC1Ev'}
-{'type': 'U', 'is_defined': False, 'name': '__ZNSt16bad_array_lengthC2Ev'}
-{'type': 'I', 'is_defined': True, 'name': '__ZNSt16bad_array_lengthC2Ev'}
-{'type': 'U', 'is_defined': False, 'name': '__ZNSt16bad_array_lengthD0Ev'}
-{'type': 'I', 'is_defined': True, 'name': '__ZNSt16bad_array_lengthD0Ev'}
-{'type': 'U', 'is_defined': False, 'name': '__ZNSt16bad_array_lengthD1Ev'}
-{'type': 'I', 'is_defined': True, 'name': '__ZNSt16bad_array_lengthD1Ev'}
-{'type': 'U', 'is_defined': False, 'name': '__ZNSt16bad_array_lengthD2Ev'}
-{'type': 'I', 'is_defined': True, 'name': '__ZNSt16bad_array_lengthD2Ev'}
{'type': 'U', 'is_defined': False, 'name': '__ZNSt16invalid_argumentD0Ev'}
{'type': 'I', 'is_defined': True, 'name': '__ZNSt16invalid_argumentD0Ev'}
{'type': 'U', 'is_defined': False, 'name': '__ZNSt16invalid_argumentD1Ev'}
@@ -1721,8 +1709,6 @@
{'type': 'I', 'is_defined': True, 'name': '__ZTISt14overflow_error'}
{'type': 'U', 'is_defined': False, 'name': '__ZTISt15underflow_error'}
{'type': 'I', 'is_defined': True, 'name': '__ZTISt15underflow_error'}
-{'type': 'U', 'is_defined': False, 'name': '__ZTISt16bad_array_length'}
-{'type': 'I', 'is_defined': True, 'name': '__ZTISt16bad_array_length'}
{'type': 'U', 'is_defined': False, 'name': '__ZTISt16invalid_argument'}
{'type': 'I', 'is_defined': True, 'name': '__ZTISt16invalid_argument'}
{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTISt16nested_exception', 'size': 0}
@@ -2013,8 +1999,6 @@
{'type': 'I', 'is_defined': True, 'name': '__ZTSSt14overflow_error'}
{'type': 'U', 'is_defined': False, 'name': '__ZTSSt15underflow_error'}
{'type': 'I', 'is_defined': True, 'name': '__ZTSSt15underflow_error'}
-{'type': 'U', 'is_defined': False, 'name': '__ZTSSt16bad_array_length'}
-{'type': 'I', 'is_defined': True, 'name': '__ZTSSt16bad_array_length'}
{'type': 'U', 'is_defined': False, 'name': '__ZTSSt16invalid_argument'}
{'type': 'I', 'is_defined': True, 'name': '__ZTSSt16invalid_argument'}
{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTSSt16nested_exception', 'size': 0}
@@ -2206,8 +2190,6 @@
{'type': 'I', 'is_defined': True, 'name': '__ZTVSt14overflow_error'}
{'type': 'U', 'is_defined': False, 'name': '__ZTVSt15underflow_error'}
{'type': 'I', 'is_defined': True, 'name': '__ZTVSt15underflow_error'}
-{'type': 'U', 'is_defined': False, 'name': '__ZTVSt16bad_array_length'}
-{'type': 'I', 'is_defined': True, 'name': '__ZTVSt16bad_array_length'}
{'type': 'U', 'is_defined': False, 'name': '__ZTVSt16invalid_argument'}
{'type': 'I', 'is_defined': True, 'name': '__ZTVSt16invalid_argument'}
{'type': 'OBJECT', 'is_defined': True, 'name': '__ZTVSt16nested_exception', 'size': 0}
diff --git a/libcxx/lib/libc++abi2.exp b/libcxx/lib/libc++abi2.exp
index 0059eb49e24..40c055dae97 100644
--- a/libcxx/lib/libc++abi2.exp
+++ b/libcxx/lib/libc++abi2.exp
@@ -283,16 +283,6 @@ __ZTISt16invalid_argument
__ZTSSt16invalid_argument
__ZTVSt16invalid_argument
-__ZNKSt16bad_array_length4whatEv
-__ZNSt16bad_array_lengthC1Ev
-__ZNSt16bad_array_lengthC2Ev
-__ZNSt16bad_array_lengthD0Ev
-__ZNSt16bad_array_lengthD1Ev
-__ZNSt16bad_array_lengthD2Ev
-__ZTISt16bad_array_length
-__ZTSSt16bad_array_length
-__ZTVSt16bad_array_length
-
__ZTSDi
__ZTSDn
__ZTSDs
diff --git a/libcxx/src/support/runtime/exception_fallback.ipp b/libcxx/src/support/runtime/exception_fallback.ipp
index 664e7f48c09..16d387b99e8 100644
--- a/libcxx/src/support/runtime/exception_fallback.ipp
+++ b/libcxx/src/support/runtime/exception_fallback.ipp
@@ -134,22 +134,6 @@ bad_array_new_length::what() const _NOEXCEPT
return "bad_array_new_length";
}
-
-bad_array_length::bad_array_length() _NOEXCEPT
-{
-}
-
-bad_array_length::~bad_array_length() _NOEXCEPT
-{
-}
-
-const char*
-bad_array_length::what() const _NOEXCEPT
-{
- return "bad_array_length";
-}
-
-
bad_cast::bad_cast() _NOEXCEPT
{
}
diff --git a/libcxx/src/support/runtime/exception_glibcxx.ipp b/libcxx/src/support/runtime/exception_glibcxx.ipp
index 0f78932f6f9..dda4432b508 100644
--- a/libcxx/src/support/runtime/exception_glibcxx.ipp
+++ b/libcxx/src/support/runtime/exception_glibcxx.ipp
@@ -22,11 +22,6 @@ bad_array_new_length::bad_array_new_length() _NOEXCEPT
{
}
-bad_array_length::bad_array_length() _NOEXCEPT
-{
-}
-
-
bad_cast::bad_cast() _NOEXCEPT
{
}
diff --git a/libcxx/src/support/runtime/exception_libcxxrt.ipp b/libcxx/src/support/runtime/exception_libcxxrt.ipp
index 6d9e0cff58d..52fe8635db7 100644
--- a/libcxx/src/support/runtime/exception_libcxxrt.ipp
+++ b/libcxx/src/support/runtime/exception_libcxxrt.ipp
@@ -23,19 +23,4 @@ const char* bad_exception::what() const _NOEXCEPT
return "std::bad_exception";
}
-
-bad_array_length::bad_array_length() _NOEXCEPT
-{
-}
-
-bad_array_length::~bad_array_length() _NOEXCEPT
-{
-}
-
-const char*
-bad_array_length::what() const _NOEXCEPT
-{
- return "bad_array_length";
-}
-
} // namespace std
diff --git a/libcxx/src/support/runtime/exception_msvc.ipp b/libcxx/src/support/runtime/exception_msvc.ipp
index 87d5a66fc8f..042d3add6c7 100644
--- a/libcxx/src/support/runtime/exception_msvc.ipp
+++ b/libcxx/src/support/runtime/exception_msvc.ipp
@@ -83,20 +83,6 @@ int uncaught_exceptions() _NOEXCEPT {
return __uncaught_exceptions();
}
-bad_array_length::bad_array_length() _NOEXCEPT
-{
-}
-
-bad_array_length::~bad_array_length() _NOEXCEPT
-{
-}
-
-const char*
-bad_array_length::what() const _NOEXCEPT
-{
- return "bad_array_length";
-}
-
#if defined(_LIBCPP_NO_VCRUNTIME)
bad_cast::bad_cast() _NOEXCEPT
{
diff --git a/libcxx/test/libcxx/language.support/support.dynamic/alloc.errors/new.badlength/bad_array_length.pass.cpp b/libcxx/test/libcxx/language.support/support.dynamic/alloc.errors/new.badlength/bad_array_length.pass.cpp
deleted file mode 100644
index c37d2343314..00000000000
--- a/libcxx/test/libcxx/language.support/support.dynamic/alloc.errors/new.badlength/bad_array_length.pass.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++98, c++03, c++11
-// XFAIL: availability
-
-// XFAIL: availability=macosx10.12
-// XFAIL: availability=macosx10.11
-// XFAIL: availability=macosx10.10
-// XFAIL: availability=macosx10.9
-// XFAIL: availability=macosx10.7
-// XFAIL: availability=macosx10.8
-
-// test bad_array_length
-
-#include <new>
-#include <type_traits>
-#include <cassert>
-
-int main()
-{
- static_assert((std::is_base_of<std::bad_alloc, std::bad_array_length>::value),
- "std::is_base_of<std::bad_alloc, std::bad_array_length>::value");
- static_assert(std::is_polymorphic<std::bad_array_length>::value,
- "std::is_polymorphic<std::bad_array_length>::value");
- std::bad_array_length b;
- std::bad_array_length b2 = b;
- b2 = b;
- const char* w = b2.what();
- assert(w);
-}
diff --git a/libcxxabi/src/stdlib_exception.cpp b/libcxxabi/src/stdlib_exception.cpp
index 6c0910267d4..0308e169a83 100644
--- a/libcxxabi/src/stdlib_exception.cpp
+++ b/libcxxabi/src/stdlib_exception.cpp
@@ -69,34 +69,4 @@ bad_array_new_length::what() const _NOEXCEPT
return "bad_array_new_length";
}
-// bad_array_length
-
-#ifndef _LIBCPP_BAD_ARRAY_LENGTH_DEFINED
-
-class _LIBCPP_EXCEPTION_ABI bad_array_length
- : public bad_alloc
-{
-public:
- bad_array_length() _NOEXCEPT;
- virtual ~bad_array_length() _NOEXCEPT;
- virtual const char* what() const _NOEXCEPT;
-};
-
-#endif // _LIBCPP_BAD_ARRAY_LENGTH_DEFINED
-
-bad_array_length::bad_array_length() _NOEXCEPT
-{
-}
-
-bad_array_length::~bad_array_length() _NOEXCEPT
-{
-}
-
-const char*
-bad_array_length::what() const _NOEXCEPT
-{
- return "bad_array_length";
-}
-
-
} // std