mirror of
https://github.com/opnsense/src.git
synced 2026-06-03 13:58:30 -04:00
Vendor import of libc++ release_60 branch r325330:
https://llvm.org/svn/llvm-project/libcxx/branches/release_60@325330
This commit is contained in:
parent
40e3ad2a19
commit
6100a9db7d
3 changed files with 14 additions and 8 deletions
|
|
@ -135,6 +135,9 @@ if (LIBCXX_CXX_ABI STREQUAL "default")
|
|||
elseif (APPLE)
|
||||
set(LIBCXX_CXX_ABI_LIBNAME "libcxxabi")
|
||||
set(LIBCXX_CXX_ABI_SYSTEM 1)
|
||||
elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
|
||||
set(LIBCXX_CXX_ABI_LIBNAME "libcxxrt")
|
||||
set(LIBCXX_CXX_ABI_INCLUDE_PATHS "/usr/include/c++/v1")
|
||||
else()
|
||||
set(LIBCXX_CXX_ABI_LIBNAME "default")
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -32,12 +32,13 @@ int main()
|
|||
#ifndef TEST_HAS_NO_EXCEPTIONS
|
||||
try {
|
||||
#endif
|
||||
std::string str(2147483648, 'a');
|
||||
SB sb;
|
||||
sb.str(str);
|
||||
assert(sb.pubpbase() <= sb.pubpptr());
|
||||
std::string str(2147483648, 'a');
|
||||
SB sb;
|
||||
sb.str(str);
|
||||
assert(sb.pubpbase() <= sb.pubpptr());
|
||||
#ifndef TEST_HAS_NO_EXCEPTIONS
|
||||
}
|
||||
catch (const std::bad_alloc &) {}
|
||||
}
|
||||
catch (const std::length_error &) {} // maybe the string can't take 2GB
|
||||
catch (const std::bad_alloc &) {} // maybe we don't have enough RAM
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,8 @@ class NotEmpty
|
|||
virtual ~NotEmpty();
|
||||
};
|
||||
|
||||
union Union {};
|
||||
union EmptyUnion {};
|
||||
struct NonEmptyUnion {int x; unsigned y;};
|
||||
|
||||
struct bit_zero
|
||||
{
|
||||
|
|
@ -84,6 +85,7 @@ int main()
|
|||
{
|
||||
test_has_not_has_unique_object_representations<void>();
|
||||
test_has_not_has_unique_object_representations<Empty>();
|
||||
test_has_not_has_unique_object_representations<EmptyUnion>();
|
||||
test_has_not_has_unique_object_representations<NotEmpty>();
|
||||
test_has_not_has_unique_object_representations<bit_zero>();
|
||||
test_has_not_has_unique_object_representations<Abstract>();
|
||||
|
|
@ -97,7 +99,7 @@ int main()
|
|||
|
||||
|
||||
test_has_unique_object_representations<unsigned>();
|
||||
test_has_unique_object_representations<Union>();
|
||||
test_has_unique_object_representations<NonEmptyUnion>();
|
||||
test_has_unique_object_representations<char[3]>();
|
||||
test_has_unique_object_representations<char[]>();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue