From 6100a9db7de1d3dd60045622df161b6288fdf88a Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Fri, 16 Feb 2018 19:10:44 +0000 Subject: [PATCH] Vendor import of libc++ release_60 branch r325330: https://llvm.org/svn/llvm-project/libcxx/branches/release_60@325330 --- CMakeLists.txt | 3 +++ .../streambuf.put.area/pbump2gig.pass.cpp | 13 +++++++------ .../has_unique_object_representations.pass.cpp | 6 ++++-- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index eb079d25618..9e8e9d5e3d9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() diff --git a/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/pbump2gig.pass.cpp b/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/pbump2gig.pass.cpp index e7bdd897c74..460e4c07ec9 100644 --- a/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/pbump2gig.pass.cpp +++ b/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/pbump2gig.pass.cpp @@ -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 } diff --git a/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.pass.cpp b/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.pass.cpp index e4a3d203ce7..52100c30404 100644 --- a/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.pass.cpp +++ b/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.pass.cpp @@ -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(); test_has_not_has_unique_object_representations(); + test_has_not_has_unique_object_representations(); test_has_not_has_unique_object_representations(); test_has_not_has_unique_object_representations(); test_has_not_has_unique_object_representations(); @@ -97,7 +99,7 @@ int main() test_has_unique_object_representations(); - test_has_unique_object_representations(); + test_has_unique_object_representations(); test_has_unique_object_representations(); test_has_unique_object_representations();