diff options
| author | Marshall Clow <mclow.lists@gmail.com> | 2015-08-17 21:14:16 +0000 |
|---|---|---|
| committer | Marshall Clow <mclow.lists@gmail.com> | 2015-08-17 21:14:16 +0000 |
| commit | 05ddbffbf3eba8ef2cac067b0cf8e9c53b78855e (patch) | |
| tree | d52df9643ff049f319e060bbaa6063f80021c889 | |
| parent | 83f4bb23c47323e8d584665310ff44ca126266e3 (diff) | |
| download | bcm5719-llvm-05ddbffbf3eba8ef2cac067b0cf8e9c53b78855e.tar.gz bcm5719-llvm-05ddbffbf3eba8ef2cac067b0cf8e9c53b78855e.zip | |
Make regex and any assert when they should throw an exception _but_ the user has decreed 'no exceptions'. This matches the behavior of string and vector
llvm-svn: 245239
| -rw-r--r-- | libcxx/include/experimental/any | 3 | ||||
| -rw-r--r-- | libcxx/include/regex | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/libcxx/include/experimental/any b/libcxx/include/experimental/any index a38397a99ae..336d6ceebd7 100644 --- a/libcxx/include/experimental/any +++ b/libcxx/include/experimental/any @@ -82,6 +82,7 @@ inline namespace fundamentals_v1 { #include <typeinfo> #include <type_traits> #include <cstdlib> +#include <cassert> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header @@ -106,7 +107,7 @@ inline void __throw_bad_any_cast() #ifndef _LIBCPP_NO_EXCEPTIONS throw bad_any_cast(); #else - _VSTD::abort(); + assert(!"bad_any_cast"); #endif } diff --git a/libcxx/include/regex b/libcxx/include/regex index 6aecd916e98..b355bbb3ac4 100644 --- a/libcxx/include/regex +++ b/libcxx/include/regex @@ -762,6 +762,7 @@ typedef regex_token_iterator<wstring::const_iterator> wsregex_token_iterator; #include <memory> #include <vector> #include <deque> +#include <cassert> #include <__undef_min_max> @@ -960,7 +961,9 @@ _LIBCPP_ALWAYS_INLINE void __throw_regex_error() { #ifndef _LIBCPP_NO_EXCEPTIONS - throw regex_error(_Ev); + throw regex_error(_Ev); +#else + assert(!"regex_error"); #endif } |

