aboutsummaryrefslogtreecommitdiff
path: root/libcxx/src/system_error.cpp
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2017-01-24 12:26:01 +0000
committerEric Fiselier <eric@efcs.ca>2017-01-24 12:26:01 +0000
commitf9e7bf3a43fd28c9ffd1523f1c832275e80a9f85 (patch)
tree6fa1b57f29c142590a431e68a822da7b3fe2a9ec /libcxx/src/system_error.cpp
parent819da50d12c24b41c974d405319fbdb82e2c4229 (diff)
downloadllvm-f9e7bf3a43fd28c9ffd1523f1c832275e80a9f85.zip
llvm-f9e7bf3a43fd28c9ffd1523f1c832275e80a9f85.tar.gz
llvm-f9e7bf3a43fd28c9ffd1523f1c832275e80a9f85.tar.bz2
Revert "[libcxx] Never use <cassert> within libc++"
This reverts commit r292883. Unfortunately <string_view> uses _LIBCPP_ASSERT in a way which is not compatible with the C++11 dylib build. I'll investigate more tomorrow. llvm-svn: 292923
Diffstat (limited to 'libcxx/src/system_error.cpp')
-rw-r--r--libcxx/src/system_error.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libcxx/src/system_error.cpp b/libcxx/src/system_error.cpp
index cbbbb5d..9411499 100644
--- a/libcxx/src/system_error.cpp
+++ b/libcxx/src/system_error.cpp
@@ -17,9 +17,9 @@
#include "cstring"
#include "cstdio"
#include "cstdlib"
+#include "cassert"
#include "string"
#include "string.h"
-#include "__debug"
#if defined(__ANDROID__)
#include <android/api-level.h>
@@ -96,7 +96,7 @@ string do_strerror_r(int ev) {
std::snprintf(buffer, strerror_buff_size, "Unknown error %d", ev);
return string(buffer);
} else {
- _LIBCPP_ASSERT(new_errno == ERANGE, "unexpected error from ::strerr_r");
+ assert(new_errno == ERANGE);
// FIXME maybe? 'strerror_buff_size' is likely to exceed the
// maximum error size so ERANGE shouldn't be returned.
std::abort();