summaryrefslogtreecommitdiffstats
path: root/libcxx
Commit message (Collapse)AuthorAgeFilesLines
...
* Implement LWG2433: uninitialized_copy()/etc. should tolerate overloaded ↵Marshall Clow2015-05-196-8/+102
| | | | | | operator& llvm-svn: 237699
* mark new/delete tests as XFAIL more carefullyEric Fiselier2015-05-194-10/+20
| | | | llvm-svn: 237664
* [libcxx] Rework sized delete.Eric Fiselier2015-05-1915-518/+509
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 237662
* Mark N4510 as complete; we already do thisMarshall Clow2015-05-181-2/+2
| | | | llvm-svn: 237638
* Add support for N4389 - std::bool_constantMarshall Clow2015-05-184-13/+58
| | | | llvm-svn: 237636
* Update C++1z status; mark issues 2059,2369,2415,2454 and 2458 as 'complete'. ↵Marshall Clow2015-05-181-5/+5
| | | | | | I have committed patches for all of them llvm-svn: 237606
* Update C++1z status; mark all the issues that require no library change as ↵Marshall Clow2015-05-181-22/+21
| | | | | | 'complete' llvm-svn: 237604
* Update C++1z status with issues and papers from LenexaMarshall Clow2015-05-181-3/+45
| | | | llvm-svn: 237596
* Fix for LWG Issue 2458: N3778 and new library deallocation signatures.Marshall Clow2015-05-184-238/+0
| | | | llvm-svn: 237592
* libcxx: Enhance lit test command in verbose mode.Logan Chien2015-05-171-5/+8
| | | | | | | Print both the compiler command and linker command so that it will be easier for developers to reproduce the failed test cases. llvm-svn: 237530
* Fix test that was failing on C++03 b/c it was using initializer listsMarshall Clow2015-05-161-2/+2
| | | | llvm-svn: 237527
* Fix build when libunwind is disabled.Logan Chien2015-05-161-0/+1
| | | | | | | | | | 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(). llvm-svn: 237519
* libcxx: Fix ARM libc++/abi and libunwind buildbot.Logan Chien2015-05-162-0/+5
| | | | | | | | | | | | | 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. llvm-svn: 237518
* Use clock_gettime()'s CLOCK_REALTIME instead of gettimeofday().Ed Schouten2015-05-141-24/+40
| | | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 237390
* Implement std::experimental::sample.Evgeniy Stepanov2015-05-138-1/+391
| | | | | | | Following specification in "C++ Extensions for Library Fundamentals": http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4480.html#alg.random.sample llvm-svn: 237264
* Document a known build issue on OS X 10.8 and later.Eric Fiselier2015-05-121-3/+12
| | | | llvm-svn: 237205
* Fix for LWG Issue 2415: Inconsistency between unique_ptr and shared_ptrMarshall Clow2015-05-103-11/+37
| | | | llvm-svn: 236953
* Fix for LWG Issue 2369: constexpr max(initializer_list) vs max_elementMarshall Clow2015-05-107-33/+107
| | | | llvm-svn: 236952
* Fix for LWG Issue 2059: C++0x ambiguity problem with map::eraseMarshall Clow2015-05-1012-0/+196
| | | | llvm-svn: 236950
* Remove some debugging printout lines. No functionality change.Marshall Clow2015-05-101-2/+0
| | | | llvm-svn: 236949
* Fix for LWG2454: Add raw_storage_iterator::base() memberMarshall Clow2015-05-102-0/+51
| | | | llvm-svn: 236948
* Fix typo in www. NFCJonathan Roelofs2015-05-081-1/+1
| | | | llvm-svn: 236902
* Replace two naked references of 'std::' with the macro '_VSTD::'. No ↵Marshall Clow2015-05-061-2/+2
| | | | | | functionality change. llvm-svn: 236593
* Found a Urbana paper that has library bitsMarshall Clow2015-05-011-1/+2
| | | | llvm-svn: 236356
* Fix -Wpessimizing-move warning by remove the call to std::move.Richard Trieu2015-04-301-1/+1
| | | | llvm-svn: 236265
* Mark LWG#2387 as complete. No code changes neededMarshall Clow2015-04-301-1/+1
| | | | llvm-svn: 236236
* Removed 'complete' from 2408; updated statusMarshall Clow2015-04-281-1/+1
| | | | llvm-svn: 236025
* Fix some preprocessor directives that were generating warnings in the test ↵Marshall Clow2015-04-282-2/+2
| | | | | | suite. llvm-svn: 235999
* Update C++17 status; mark issues 2170, 2377, and 2408 as complete. We ↵Marshall Clow2015-04-281-3/+3
| | | | | | already do these; no code changes necessary. llvm-svn: 235992
* Fixed an 'extra tokens at end of #endif directive' warning in experimental/ratioMarshall Clow2015-04-231-1/+1
| | | | llvm-svn: 235607
* Remove constexpr support for std::apply because it introduces regressions.Eric Fiselier2015-04-195-11/+19
| | | | llvm-svn: 235274
* A few bits of N2994 didn't get fully implemented a long time ago. Thanks to ↵Marshall Clow2015-04-168-19/+90
| | | | | | STL@microsoft.com for the bug report llvm-svn: 235134
* Qualify an internal call in is_assignable to prevent ADL lookup, which would ↵Marshall Clow2015-04-142-1/+7
| | | | | | 'complete' an type definition unnecessarily. Thanks to Richard Smith for the report. llvm-svn: 234886
* In many places, there was an #ifdef/#else block that selected one of two ↵Marshall Clow2015-04-0712-161/+37
| | | | | | implmentations of rebind_alloc based on whether or not we had template aliases. Create a helper struct to encapsulate that bit of logic, and replace all the ifdefs with uses of that struct. No functionality change intented. llvm-svn: 234296
* Fix race conditions in test class used throughout the std::thread tests.Eric Fiselier2015-04-0210-15/+34
| | | | | | | | | | | The test class 'G' reads and writes to the same static variables in its constructor, destructor and call operator. When threads are constructed using `std::thread t((G()))` there is a race condition between the destruction of the temporary and the execution of `G::operator()()`. The fix is to simply create the input before creating the thread. llvm-svn: 233946
* [libcxx] Fix bug in shared_timed_mutex that could cause a program to hang.Eric Fiselier2015-04-022-0/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The summary of the bug, provided by Stephan T. Lavavej: In shared_timed_mutex::try_lock_until() (line 195 in 3.6.0), you need to deliver a notification. The scenario is: * There are N threads holding the shared lock. * One thread calls try_lock_until() to attempt to acquire the exclusive lock. It sets the "I want to write" bool/bit, then waits for the N readers to drain away. * K more threads attempt to acquire the shared lock, but they notice that someone said "I want to write", so they block on a condition_variable. * At least one of the N readers is stubborn and doesn't release the shared lock. * The wannabe-writer times out, gives up, and unsets the "I want to write" bool/bit. At this point, a notification (it needs to be notify_all) must be delivered to the condition_variable that the K wannabe-readers are waiting on. Otherwise, they can block forever without waking up. Reviewers: mclow.lists, jyasskin Reviewed By: jyasskin Subscribers: jyasskin, cfe-commits Differential Revision: http://reviews.llvm.org/D8796 llvm-svn: 233944
* Remove statement with no effect inside tests.Eric Fiselier2015-04-012-2/+0
| | | | llvm-svn: 233816
* [libcxx] Optimize vectors uninitialized construction of trivial types from ↵Eric Fiselier2015-03-312-23/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | an iterator range. Summary: In certain cases vector can use memcpy to construct a range of elements at the back of the vector. We currently don't do this resulting in terrible code gen in non-optimized mode and a very large slowdown compared to libstdc++. This patch adds a `__construct_forward_range(Allocator, Iter, Iter, _Ptr&)` and `__construct_forward_range(Allocator, Tp*, Tp*, Tp*&)` functions to `allocator_traits` which act similarly to the existing `__construct_forward(...)` functions. This patch also changes vectors `__construct_at_end(Iter, Iter)` to be `__construct_at_end(Iter, Iter, SizeType)` where SizeType is the size of the range. `__construct_at_end(Iter, Iter, SizeType)` now calls `allocator_traits<Tp>::__construct_forward_range(...)`. This patch is based off the design of `__swap_out_circular_buffer(...)` which uses `allocator_traits<Tp>::__construct_forward(...)`. On my machine this code performs 4x better than the current implementation when tested against `std::vector<int>`. Reviewers: howard.hinnant, titus, kcc, mclow.lists Reviewed By: mclow.lists Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D8109 llvm-svn: 233711
* [libcxx] Add code coverage configuration to CMake and LIT.Eric Fiselier2015-03-316-0/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds configuration to CMake and LIT for running the libc++ test-suite to generate code coverage. To use code coverage use following instructions. * Find the clang resource dir using `$CXX -print-search-dirs`. Let <library-dir> be the first library search directory. * `cmake <regular-options> -DLIBCXX_GENERATE_COVERAGE=ON -DLIBCXX_COVERAGE_LIBRARY=<library-dir>/lib/<platform>/libclang_rt.profile.a <source>` * `make cxx` * `make check-libcxx` * `make generate-libcxx-coverage` The reason I want this patch upstreamed is so I can setup a bot that generates code coverage and posts in online for every revision. Reviewers: mclow.lists, jroelofs, danalbert Reviewed By: danalbert Differential Revision: http://reviews.llvm.org/D8716 llvm-svn: 233669
* Allow enabling CCache through an env variable. This helps enable/disable the ↵Eric Fiselier2015-03-311-1/+2
| | | | | | option on buildbots. llvm-svn: 233659
* Make the new tests better; make sure that we're testing the case where no ↵Marshall Clow2015-03-302-4/+11
| | | | | | reallocation has to happen llvm-svn: 233641
* While testing Erik's code coverage scripts, I found a hole in the test suite ↵Marshall Clow2015-03-302-16/+74
| | | | | | - vector::assign where a reallocation was not required had no tests. Add some llvm-svn: 233557
* [libcxx] Fix PR22771 - Support access control SFINAE in the library version ↵Eric Fiselier2015-03-302-5/+18
| | | | | | | | | | | | | | | | | | | of is_convertible. Summary: Currently the conversion check does not take place in a context where access control SFINAE is applied. This patch changes the context of the test expression so that SFINAE occurs if access control does not permit the conversion. Related bug: https://llvm.org/bugs/show_bug.cgi?id=22771 Reviewers: mclow.lists, rsmith, dim Reviewed By: dim Subscribers: dim, rodrigc, emaste, cfe-commits Differential Revision: http://reviews.llvm.org/D8461 llvm-svn: 233552
* Only enable special apple link flags for libc++abi (or none)Eric Fiselier2015-03-271-1/+2
| | | | llvm-svn: 233368
* Fix PR23041. Use lock_shared() as opposed to lock() in shared_lock test.Eric Fiselier2015-03-271-1/+1
| | | | llvm-svn: 233367
* cleanup comments in sym_checkEric Fiselier2015-03-271-5/+5
| | | | llvm-svn: 233364
* Add readelf support to abi_check. Prefer readelf over nmEric Fiselier2015-03-271-12/+88
| | | | llvm-svn: 233360
* Add tests for library version of is_convertibleEric Fiselier2015-03-261-0/+18
| | | | llvm-svn: 233285
* Make the presence of stdin and stdout optional.Ed Schouten2015-03-2617-55/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea behind Nuxi CloudABI is that it is targeted at (but not limited to) running networked services in a sandboxed environment. The model behind stdin, stdout and stderr is strongly focused on interactive tools in a command shell. CloudABI does not support the notion of stdin and stdout, as 'standard input/output' does not apply to services. The concept of stderr does makes sense though, as services do need some mechanism to log error messages in a uniform way. This patch extends libc++ in such a way that std::cin and std::cout and the associated <cstdio>/<cwchar> functions can be disabled through the flags _LIBCPP_HAS_NO_STDIN and _LIBCPP_HAS_NO_STDOUT, respectively. At the same time it attempts to clean up src/iostream.cpp a bit. Instead of using a single array of mbstate_t objects and hardcoding the array indices, it creates separate objects that declared next to the iostream objects and their buffers. The code is also restructured by interleaving the construction and setup of c* and wc* objects. That way it is more obvious that this is done identically. The c* and wc* objects already have separate unit tests. Make use of this fact by adding XFAILs in case libcpp-has-no-std* is set. That way the tests work in both directions. If stdin or stdout is disabled, these tests will therefore test for the absence of c* and wc*. Differential Revision: http://reviews.llvm.org/D8340 llvm-svn: 233275
* Remove the state_types array.Ed Schouten2015-03-261-8/+12
| | | | | | | | | | | | | | | If we want to add support for making std::cin and std::cout optional, it is impractical to have all of the mbstate_t objects in one array. This would mean that if std::cin and std::cout are omitted, the state_types array is only used partially. Solve this by using separate global variables. These are placed right next to the iostream object and the buffer, meaning we can easily #ifdef them away. Differential Revision: http://reviews.llvm.org/D8359 llvm-svn: 233274
OpenPOWER on IntegriCloud