summaryrefslogtreecommitdiffstats
path: root/libcxx/include/vector
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2019-03-18 21:50:12 +0000
committerEric Fiselier <eric@efcs.ca>2019-03-18 21:50:12 +0000
commit61b302f94fd9983651bf210c8a1c0b116612022a (patch)
tree2df88e9d5398a3fcd1e7606c2c53feac4cc52170 /libcxx/include/vector
parent2d5e7adf26f482280c62c5a759ac052bc4cd5023 (diff)
downloadbcm5719-llvm-61b302f94fd9983651bf210c8a1c0b116612022a.tar.gz
bcm5719-llvm-61b302f94fd9983651bf210c8a1c0b116612022a.zip
Remove exception throwing debug mode handler support.
Summary: The reason libc++ implemented a throwing debug mode handler was for ease of testing. Specifically, I thought that if a debug violation aborted, we could only test one violation per file. This made it impossible to test debug mode. Which throwing behavior we could test more! However, the throwing approach didn't work either, since there are debug violations underneath noexcept functions. This lead to the introduction of `_NOEXCEPT_DEBUG`, which was only noexcept when debug mode was off. Having thought more and having grown wiser, `_NOEXCEPT_DEBUG` was a horrible decision. It was viral, it didn't cover all the cases it needed to, and it was observable to the user -- at worst changing the behavior of their program. This patch removes the throwing debug handler, and rewrites the debug tests using 'fork-ing' style death tests. Reviewers: mclow.lists, ldionne, thomasanderson Reviewed By: ldionne Subscribers: christof, arphaman, libcxx-commits, #libc Differential Revision: https://reviews.llvm.org/D59166 llvm-svn: 356417
Diffstat (limited to 'libcxx/include/vector')
-rw-r--r--libcxx/include/vector8
1 files changed, 4 insertions, 4 deletions
diff --git a/libcxx/include/vector b/libcxx/include/vector
index 8413d89bb73..e560b083afe 100644
--- a/libcxx/include/vector
+++ b/libcxx/include/vector
@@ -779,9 +779,9 @@ public:
void swap(vector&)
#if _LIBCPP_STD_VER >= 14
- _NOEXCEPT_DEBUG;
+ _NOEXCEPT;
#else
- _NOEXCEPT_DEBUG_(!__alloc_traits::propagate_on_container_swap::value ||
+ _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value ||
__is_nothrow_swappable<allocator_type>::value);
#endif
@@ -2064,9 +2064,9 @@ template <class _Tp, class _Allocator>
void
vector<_Tp, _Allocator>::swap(vector& __x)
#if _LIBCPP_STD_VER >= 14
- _NOEXCEPT_DEBUG
+ _NOEXCEPT
#else
- _NOEXCEPT_DEBUG_(!__alloc_traits::propagate_on_container_swap::value ||
+ _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value ||
__is_nothrow_swappable<allocator_type>::value)
#endif
{
OpenPOWER on IntegriCloud