summaryrefslogtreecommitdiffstats
path: root/libcxx
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix std::function allocator constructors in C++03.Eric Fiselier2015-06-145-137/+232
| | | | | | | | | The C++03 version of function tried to default construct the allocator in the uses allocator constructors when no allocation was performed. These constructors would fail to compile when used with allocators that had no default constructor. llvm-svn: 239708
* Cleanup result_of tests and fix issues with the C++03 result_of.Eric Fiselier2015-06-134-68/+314
| | | | | | | | | | The two main fixes this patch contains are: - use __identity_t instead of common_type. common_type was used as an identity metafunction but the decay resulted in incorrect results. - Pointers to free functions were not counted as functions. Remove the pointer before checking if a type is a function. llvm-svn: 239668
* Remove warnings about old CMake optionsEric Fiselier2015-06-131-21/+0
| | | | llvm-svn: 239667
* Fix PR12999 - unordered_set::insert calls operator new when no insert occursEric Fiselier2015-06-132-2/+87
| | | | | | | | | | | | | | | | | | | | | | | Summary: when `unordered_set::insert(value_type&&)` was called it would be treated like `unordered_set::emplace(Args&&)` and it would allocate and construct a node before trying to insert it. This caused unnecessary allocations when the value was already in the set. This patch adds an overload to `__hash_table::__insert_unique` that specifically handles `value_type&&` more link `value_type const &`. This patch also adds a single unified insert function for values into `__hash_table` called `__insert_unique_value` that handles the cases for `__insert_unique(value_type&&)` and `__insert_unique(value_type const &)`. This patch fixes PR12999: http://llvm.org/bugs/show_bug.cgi?id=12999. Reviewers: mclow.lists, titus, danalbert Reviewed By: danalbert Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D7570 llvm-svn: 239666
* [libcxx] Fix detection of __is_final.Eric Fiselier2015-06-138-49/+42
| | | | | | | | | | | | | | Summary: Currently we only enable the use of __is_final(...) with Clang. GCC also provides __is_final(...) since 4.7 in all standard modes. This patch creates the macro _LIBCPP_HAS_IS_FINAL to note the availability of `__is_final`. Reviewers: danalbert, mclow.lists Reviewed By: mclow.lists Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D8795 llvm-svn: 239664
* [libcxx] Use __decltype instead of __typeof__Eric Fiselier2015-06-131-1/+16
| | | | | | | | | | | | | | | | | | Summary: Both clang and GCC provide C++11 decltype semantics as __decltype in c++03 mode. We should use this instead of __typeof__ when availble. GCC added __decltype in 4.6.0, and AFAIK clang provided __decltype ever since 3.3. Unfortunately `__has_builtin(__decltype)` doesn't work for clang so we need to check the compiler version instead. Reviewers: mclow.lists Reviewed By: mclow.lists Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D10426 llvm-svn: 239662
* Make __void_t unary and always provide it.Eric Fiselier2015-06-131-3/+1
| | | | llvm-svn: 239655
* LWG2442: call_once() shouldn't DECAY_COPY(). Patch from K-Ballo.Eric Fiselier2015-06-133-23/+79
| | | | | | | This patch fixes LWG issue 2422 by removing the DECAY_COPY from call once. The review can be found here: http://reviews.llvm.org/D10191 llvm-svn: 239654
* Enable __is_trivially* intrinsics for GCC 5.1Eric Fiselier2015-06-132-6/+11
| | | | | | | | | | | | Until GCC 5.1 the __is_trivially* intrinsics were not provided. Enable use of the builtins for GCC 5.1. Also enable Reference qualified member functions for GCC 4.9 and greater. This patch also defines _GNUC_VER to 0 when __GNUC__ is not defined because libc++ assumes _GNUC_VER is always defined. llvm-svn: 239653
* Refactor is_member_function_pointer to use is_function and not ↵Eric Fiselier2015-06-132-23/+53
| | | | | | | | | | __member_function_traits. Replacing the dependancy on __member_function_traits with is_function allows is_member_function_pointer to work more often. In particular it allows it to work when we don't have variadic templates but the function has an arity > 3. llvm-svn: 239649
* Prevent dependancy on libatomic when using GCC to provide <atomic>.Eric Fiselier2015-06-131-6/+8
| | | | | | | | | The __atomic_is_lock_free(...) function sometimes requires linkage to libatomic if it cannot be evaluated at compile time. Remove __c11_atomic_is_lock_free and use __atomic_is_lock_free(sizeof(Tp)) directly so that it can be evaluated at compile time. llvm-svn: 239648
* Fix PR23293 - Do not unlock shared state before notifying consumers.Eric Fiselier2015-06-123-9/+67
| | | | | | | | Within the shared state methods do not unlock the lock guards manually. This could cause a race condition where the shared state is destroyed before the method is complete. llvm-svn: 239577
* Change #ifdefs in test to UNSUPPORTED. No functionality change in the testsMarshall Clow2015-06-119-48/+10
| | | | llvm-svn: 239562
* Fix PR#23767. Add tests for iterator invalidation for ↵Marshall Clow2015-06-055-2/+248
| | | | | | deque::erase/pop_front/pop_back llvm-svn: 239196
* Avoid C-style cast.Joerg Sonnenberger2015-06-051-1/+1
| | | | llvm-svn: 239160
* While applying N4258, I forgot about LWG#2455, which modified the ↵Marshall Clow2015-06-046-51/+5
| | | | | | modifications. Correct those - h/t: Howard llvm-svn: 239004
* More N4258 changes. This time vector's constructorsMarshall Clow2015-06-045-6/+77
| | | | llvm-svn: 238990
* More of N4258 implementation. Mark all of our test_allocators as noexcept ↵Marshall Clow2015-06-038-29/+113
| | | | | | constructible. Make the constructors for basic_string noexcept all the time (under C++14). Update tests to reflect the new world order. More to come. llvm-svn: 238957
* Add 'is_always_equal' tests for scoped_allocator. Found that I had typed ↵Marshall Clow2015-06-032-1/+76
| | | | | | '||' where I meant '&&' in the code; fixed that, too llvm-svn: 238931
* Revert changes inadvertantly committedMarshall Clow2015-06-021-23/+4
| | | | llvm-svn: 238880
* Move uncaught_exeption() definition inside the #ifdef block like ↵Marshall Clow2015-06-022-5/+24
| | | | | | uncaught_exceptions() llvm-svn: 238879
* Fix breakage that I introduced in r238848Marshall Clow2015-06-021-3/+11
| | | | llvm-svn: 238870
* Implement the first part of N4258 - allocator_traits<X>::is_always_equal. ↵Marshall Clow2015-06-024-1/+91
| | | | | | Also fixes PR#23723 llvm-svn: 238848
* Implement uncaught_exceptions() using the newly added hooks in libc++abi, ↵Marshall Clow2015-06-024-7/+60
| | | | | | when available llvm-svn: 238846
* Fix some places where we could call memmove(null,xxx,0) - which is UBMarshall Clow2015-06-021-6/+14
| | | | llvm-svn: 238831
* In the case where we are copying/moving zero elements, do less workMarshall Clow2015-06-021-2/+6
| | | | llvm-svn: 238828
* Add missing return statements in C++03 std::functionEric Fiselier2015-06-021-0/+4
| | | | llvm-svn: 238803
* Add TODO items and remove use of 'noexcept' in C++03 test.Eric Fiselier2015-06-022-2/+4
| | | | llvm-svn: 238802
* Remove debugging codeMarshall Clow2015-05-311-2/+0
| | | | llvm-svn: 238674
* Don't try to memcpy zero bytes; sometimes the source pointer is NULL, and ↵Marshall Clow2015-05-311-3/+8
| | | | | | that's UB. Thanks to Nuno Lopes for the catch. llvm-svn: 238666
* Add TODO note about switching to __decltypeEric Fiselier2015-05-291-0/+2
| | | | llvm-svn: 238631
* Fix PR#23647 - make_shared<volatile bool> - second tryMarshall Clow2015-05-272-4/+4
| | | | llvm-svn: 238370
* Revert 238354 while I figure out what broke in weak_ptrMarshall Clow2015-05-272-5/+5
| | | | llvm-svn: 238355
* Fix PR#23647 - make_shared<volatile bool>Marshall Clow2015-05-272-2/+63
| | | | llvm-svn: 238354
* Add N4259 to the list of papers from Lenexa. Update links to point at public ↵Marshall Clow2015-05-271-7/+8
| | | | | | repos. llvm-svn: 238340
* Get thread sleep_for test passing in C++03Eric Fiselier2015-05-271-2/+5
| | | | llvm-svn: 238273
* Mark __convert_to_integral test as XFAIL in c++03Eric Fiselier2015-05-271-0/+3
| | | | llvm-svn: 238271
* Cleanup move/forward tests and remove references to __rv.Eric Fiselier2015-05-273-30/+15
| | | | llvm-svn: 238270
* Add test macros header to remove dependance on __config macros.Eric Fiselier2015-05-272-0/+141
| | | | llvm-svn: 238267
* Fix broken test I just addedMarshall Clow2015-05-261-3/+3
| | | | llvm-svn: 238234
* Add tests to ensure that string/vector/array have contiguous iterators - ↵Marshall Clow2015-05-264-1/+125
| | | | | | which they did. Mark N4284 as complete llvm-svn: 238233
* Mark N4366 as complete. libc++ has done this since 2012Marshall Clow2015-05-261-1/+1
| | | | llvm-svn: 238207
* Add TODO itemsEric Fiselier2015-05-221-3/+38
| | | | llvm-svn: 237988
* Start a to-do list for libc++Marshall Clow2015-05-201-0/+12
| | | | llvm-svn: 237813
* Fix building and testing libc++ with GCC.Eric Fiselier2015-05-204-6/+9
| | | | | | | | | | | | | | | | 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. llvm-svn: 237767
* Fix race condition in thread test.Eric Fiselier2015-05-191-8/+25
| | | | llvm-svn: 237745
* Address @danalberts comments on r237700Eric Fiselier2015-05-193-3/+3
| | | | llvm-svn: 237740
* Fix uninitialized values and bad enum conversions found by UBSAN.Eric Fiselier2015-05-194-17/+17
| | | | llvm-svn: 237738
* Rename internal trait that used non-reserved name.Eric Fiselier2015-05-191-4/+4
| | | | llvm-svn: 237737
* Add compiler flag test support to LIT. Fix new/delete tests on apple-clang.Eric Fiselier2015-05-194-11/+28
| | | | llvm-svn: 237700
OpenPOWER on IntegriCloud