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. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292923 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user