summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-01-14Don't dump llvm-config --cmakedir output if command fails.Eric Fiselier
This patch adjusts the out-of-tree CMake configuration so that the stderr output is ignored when an old llvm-config is found that doesn't support --cmakedir. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291991 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-14Don't force use of lld in tests on WindowsEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291987 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-14Remove unused parameters in C++03Eric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291986 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-13Diagnose invalid memory orderings in <atomic>Eric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291976 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-13Diagnose non-const-callable hash functions and comparatorsEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291969 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-13Add _LIBCPP_DIAGNOSE_WARNING and _LIBCPP_DIAGNOSE_ERROR macros.Eric Fiselier
Clang recently added a `diagnose_if(cond, msg, type)` attribute which can be used to generate diagnostics when `cond` is a constant expression that evaluates to true. Otherwise no attribute has no effect. This patch adds _LIBCPP_DIAGNOSE_ERROR/WARNING macros which use this new attribute. Additionally this patch implements a diagnostic message when a non-const-callable comparator is given to a container. Note: For now the warning version of the diagnostic is useless within libc++ since warning diagnostics are suppressed by the system header pragma. I'm going to work on fixing this. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291961 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-13Update version to 5.0Eric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291928 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-13Fix merge conflict caused by r291921Eric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291925 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-13Revert "Rework fix for PR19460 - Use explicit bool as an extension instead."Eric Fiselier
This reverts commit 3a1b90a866b6d5d62a5f37fbfb3a1ee36cc70dd1. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291921 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-12Add new macro _LIBCPP_BUILTIN_MEMCMP_ISCONSTEXPR to use in std::char_traits. Marshall Clow
This tells whether or not the builtin function __builtin_memcmp is constexpr. Only defined for clang 4.0 and later, and not true for any shipping version of Apple's clang. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291773 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-12[libc++] Pair _aligned_malloc with _aligned_freeShoaib Meenai
Attempting to pair an `_aligned_malloc` with a regular free causes heap corruption. Pairing with `_aligned_free` is required instead. Makes the following libc++ tests pass on Windows: ``` std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp ``` Differential Revision: https://reviews.llvm.org/D28512 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291743 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-12disable use of __builtin_memcmp temporarily to get the tests passing againMarshall Clow
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291742 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-12Implement P0426: Constexpr for std::char_traitsMarshall Clow
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291741 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-11Revert "[CMake][libcxx] Move Python check to main CMake file"Petr Hosek
This reverts commit 39441fe9f00a58ffc2fdff92a4b0e8a280a5f444. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291728 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-11Revert "[CMake][libcxx] Do not rely on the existence of c++abi or unwind ↵Petr Hosek
targets" This reverts commit 94fc5a96f58071703d81d14690094dcd266a5e17. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291727 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-11Revert "[CMake][libcxx] Check that we have libcxxabi before using it"Petr Hosek
This reverts commit 8c91834411b322ab360eb1f193f489327e719652. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291726 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-11[CMake][libcxx] Check that we have libcxxabi before using itPetr Hosek
When doing standalone build, check that we actually have libcxxabi before attempting to use it. Differential Revision: https://reviews.llvm.org/D28580 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291723 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-11[CMake][libcxx] Do not rely on the existence of c++abi or unwind targetsPetr Hosek
There is no guaranteed order in which CMake files for individual runtimes are invoked and therefore we cannot rely on existence of targets defined in other runtimes. Use the new HAVE_<name> options instead in those cases. Differential Revision: https://reviews.llvm.org/D28391 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291632 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-10[CMake][libcxx] Move Python check to main CMake filePetr Hosek
This is to make sure this check is called even when building as part of LLVM runtimes when we are doing standalone but not out of tree build. Differential Revision: https://reviews.llvm.org/D28392 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291592 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-10Qualify some type names that I thought were fine, but some of the bots don't ↵Marshall Clow
like. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291580 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-10Fix up some mismatched SFINAE conditionsin shared_ptr; some used '_Tp*', ↵Marshall Clow
others used 'element_type *'. Today, they're the same - but soon they won't be. No functional change. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291572 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-10Mark tests as unsupported under libcpp-no-exceptionsRoger Ferrer Ibanez
The destructor of std::promise needs to construct a std::future_error exception so it calls std::make_exception_ptr. But under libcpp-no-exceptions this will trigger an abort. Differential Revision: https://reviews.llvm.org/D27614 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291550 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-10threading_support: delete the critical sectionSaleem Abdulrasool
Although the CriticalSection itself doesnt need to be destroyed, there may be debug data associated with it. Plug a possible small leak. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291536 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-10[Chrono][Darwin] Include header for gettimeofdayBruno Cardoso Lopes
Followup on r291466 and include the proper header. This fixes: https://build.chromium.org/p/chromium.fyi/builders/ClangToTMac/builds/12620/steps/gclient%20runhooks/logs/stdio git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291517 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-09[cmake] Obtain LLVM_CMAKE_PATH from llvm-config if availableMichal Gorny
Use the new --cmakedir option to obtain LLVM_CMAKE_PATH straight from llvm-config. Fallback to local reconstruction if llvm-config does not support this option. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291508 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-09Adorn __call_once_proxy with `inline` and `_LIBCPP_INLINE_VISIBILITY`Justin Bogner
As per discussion with mclow and EricWF on irc, this is small and simple enough to deserve being inlined. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291497 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-09Swap two lines in __mutex_base. On systems with high clock rates, we could ↵Marshall Clow
mistakenly return no_timeout when a mutex had timed out if we got a tick between these two lines. Thanks to Brian Cain for the bug report. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291492 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-09Move _PairT declaration out of __hash_combine to avoid warning under C++98Dimitry Andric
Summary: Some parts of the FreeBSD tree are still compiled with C++98, and until rL288554 this has always worked fine. After that, a complaint about the newly introduced local _PairT is produced: /usr/include/c++/v1/memory:3354:27: error: template argument uses local type '_PairT' [-Werror,-Wlocal-type-template-args] typedef __scalar_hash<_PairT> _HashT; ^~~~~~ /usr/include/c++/v1/memory:3284:29: error: template argument uses local type '_PairT' [-Werror,-Wlocal-type-template-args] : public unary_function<_Tp, size_t> ^~~ /usr/include/c++/v1/memory:3356:12: note: in instantiation of template class 'std::__1::__scalar_hash<_PairT, 2>' requested here return _HashT()(__p); ^ As far as I can see, there should be no problem moving the _PairT struct to just before the __hash_combine() function, which fixes this particular warning. Reviewers: mclow.lists, EricWF Subscribers: cfe-commits, emaste Differential Revision: https://reviews.llvm.org/D28472 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291476 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-09Added XFAIL for the apple versions of clang as wellMarshall Clow
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291475 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-09[Chrono][Darwin] Make steady_clock use CLOCK_UPTIME_RAWBruno Cardoso Lopes
Use CLOCK_UPTIME_RAW in case clock_gettime is available on Darwin. On Apple platforms only CLOCK_UPTIME_RAW or mach_absolute_time are able to time functions in the nanosecond range. Thus, they are the only acceptable implementations of steady_clock. Differential Revision: https://reviews.llvm.org/D27429 rdar://problem/29449467 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291466 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-09Implement P0403R1 - 'Literal suffixes for basic_string_view'. Requires clang ↵Marshall Clow
4.0 (specifically, r290744) git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291457 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-09[libcxx] Fix externally-threaded shared library builds after r291275.Asiri Rathnayake
Need to allow unresolved symbols in the dylib. This was previously done for LIBCXX_HAS_EXTERNAL_THREAD_API, but we have since split that into two with LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY being the externally-threaded variant. Also a minor CMakeLists.txt cleanup. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291433 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-07Replace identifiers called `__out` because Windows.h #defines it.Eric Fiselier
Windows is greedy and it defines the identifier `__out` as a macro. This patch renames all conflicting libc++ identifiers in order to correctly work on Windows. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291345 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-07Added "Michael Park" to `CREDITS.TXT`.Michael Park
Summary: Test commit + give myself credit. Reviewers: EricWF Differential Revision: https://reviews.llvm.org/D28431 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291344 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-07[libc++] Implement terminate(), unexpected() and uncaught_exceptions() on ↵Eric Fiselier
Windows Summary: This patch implements the following functions on Windows by forwarding to the MSVCRT: * `get_terminate()` * `set_terminate()` * `terminate()` * `set_unexpected()` * `get_unexpected()` * `unexpected()` * `uncaught_exception()` * `uncaught_exceptions()` Reviewers: compnerd, rnk, majnemer, smeenai Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D28442 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291343 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-07Ensure Sleep(...) isn't passed the value 0 on WindowsEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291342 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-07Explicitly specify MSVC mangling of iostream globals. Patch from Dave LeeEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291337 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-07system_error: correct ELAST emulation on WindowsSaleem Abdulrasool
ELAST should point to the last valid error string value. However, `_sys_nerr` provides the number of elements in the errlist array. Since the index is 0-based, this is off-by-one. Adjust it accordingly. Thanks to David Majnemer for catching this! git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291336 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-07provide Win32 native threadingSaleem Abdulrasool
Add an implementation for the Win32 threading model as a backing API for the internal c++ threading interfaces. This uses the Fls* family for the TLS (which has the support for adding termination callbacks), CRITICAL_SECTIONs for the recursive mutex, and Slim Reader/Writer locks (SRW locks) for non-recursive mutexes. These APIs should all be available on Vista or newer. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291333 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-07[libc++] Tolerate presence of __deallocate macroEric Fiselier
Summary: On Windows the identifier `__deallocate` is defined as a macro by one of the Windows system headers. Previously libc++ worked around this by `#undef __deallocate` and generating a warning. However this causes the WIN32 version of `__threading_support` to always generate a warning on Windows. This is not OK. This patch renames all usages of `__deallocate` internally as to not conflict with the macro. Reviewers: mclow.lists, majnemer, rnk, rsmith, smeenai, compnerd Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D28426 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291332 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-07thread: implement sleep_for on WindowsSaleem Abdulrasool
Windows does not provide an implementation of `nanosleep`. Round up the time duration to the nearest ms and use `Sleep`. Although this may over-sleep, there is no hard real-time guarantee on the wake, so sleeping a bit more is better than under-sleeping as it within the specification. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291331 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-07[libc++] Correct macro name in documenationShoaib Meenai
The macro is named `_LIBCPP_TEMPLATE_VIS`, not `_LIBCPP_TEMPLATE_ONLY`. No functional change. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291330 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-07Add _LIBCPP_ABI_[ITANIUM|MICROSOFT] macros.Eric Fiselier
This patch adds a libc++ configuration macro for the ABI we are targeting, either Itanium or Microsoft. For now we configure for the Microsoft ABI when on Windows with a compiler that defines _MSC_VER. However this is only temporary until Clang implements builtin macros we can use. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291329 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-07[libcxx] [test] Strip trailing whitespace. NFC, no code review.Stephan T. Lavavej
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291322 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-07Get all tuple tests passing on WindowsEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291311 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-07Fix linking of DLL's on WindowsEric Fiselier
On Windows the runtime search path for DLL's is the same as PATH. This patch changes the test suite to add the libc++ build directory to the runtime PATH. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291309 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-06Configure default ABI library as NONE on WindowsEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291306 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-06Fix breakage caused when _LIBCPP_HAS_THREAD_API_PTHREAD is manually definedEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291298 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-06Add _LIBCPP_COMPILER_[CLANG|GCC|MSVC|IBM] macros.Eric Fiselier
This patch refactors the compiler detection done in `__config` by creating a set of `_LIBCPP_COMPILER_<TYPE>` macros. The goal of this patch is to make it easier to detect what compiler is being used outside of `__config`. Additionally this patch removes workarounds for GCC in `__bit_reference`. I tested GCC 4.8 and 4.9 without the workaround and neither seemed to need it anymore. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291286 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-06Replace _LIBCPP_HAS_NO_DELETED_FUNCTIONS with _LIBCPP_CXX03_LANGEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291278 91177308-0d34-0410-b5e6-96231b3b80d8