The changes in src/exception.cpp and cmake/Modules/HandleLibCXXABI.cmake fix a
bug when building libc++ with GCC. Because GCC does not support __has_include
we need to explicitly tell it that we are building against libc++abi via the
preprocessor definition `LIBCXX_BUILDING_LIBCXXABI`.
The changes in include/ratio are to work around CWG defect
1712 (constexpr variable template declarations). GCC 4.8 and before has not
adopted the resolution to this defect.
The changes in include/exception work around an issue where is_final is used
without it being defined in type_traits.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@237767 91177308-0d34-0410-b5e6-96231b3b80d8
Summary:
This patch does 2 main things:
1. Enable sized delete if the feature test macro `__cpp_sized_deallocation` is enabled.
2. Rework and cleanup all of the sized delete tests.
Test Plan:
The sized delete replacement tests are now split into 4 files:
1. sized_delete11.pass.cpp: Ensure overriding sized delete in C++11 has no effect.
2. sized_delete14.pass.cpp: Test overriding sized delete in C++14 and ensure it is called. This test fails on clang and GCC < 5.1.
3. size_delete_calls_unsized_delete_.pass.cpp: Test that the default sized delete calls unsized delete.
4. sized_delete_fsizeddeallocation.pass.cpp: Test overriding sized delete when -fsized-deallocation is passed. This test should pass on clang and GCC >= 5.1
I have also removed a lot of cruft from the old tests. They no longer replace the new handler and tests that it is called for bad allocations.
Reviewers: mclow.lists
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D9831
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@237662 91177308-0d34-0410-b5e6-96231b3b80d8
Print both the compiler command and linker command so that it will be
easier for developers to reproduce the failed test cases.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@237530 91177308-0d34-0410-b5e6-96231b3b80d8
The previous commit breaks the builds when libc++abi is not built with
libunwind becuase the default value for LIBCXXABI_USE_LLVM_UNWINDER is
OFF, which is not pythonized.
This CL fix the problem by calling pythonize_bool().
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@237519 91177308-0d34-0410-b5e6-96231b3b80d8
The test cases were crashing due to the mixed usage of the unwinding
functions from both libunwind and libgcc_s. The unwind functions are
mixed because the "llvm_unwinder" entry is not available in the
lit.site.cfg for libc++. As a result, "-lgcc_s" is picked instead of
"-lunwind". The extra option to lit --param=link_flags="-lunwind" won't
help either.
This CL fix the problem by adding llvm_unwinder to lit.site.cfg.in.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@237518 91177308-0d34-0410-b5e6-96231b3b80d8
The system_clock::now() function currently uses gettimeofday(). The
problem with gettimeofday() is that it is an obsolete XSI function,
hence unavailable on CloudABI. See:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/gettimeofday.html
Change this code to use clock_gettime() with CLOCK_REALTIME instead,
which is more consistent, as clock_gettime() is already used for
steady_clock.
A previous version of this change actually attempted to change
system_clock::duration, but I reverted this part as it breaks the
existing ABI.
Differential Revision: http://reviews.llvm.org/D8253
Approved by: jroelofs
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@237390 91177308-0d34-0410-b5e6-96231b3b80d8