summaryrefslogtreecommitdiffstats
path: root/libcxx
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Don't let time_put test use implementation dependent constructs.Ed Schouten2015-03-261-49/+11
| | | | | | | | | | | | | | | | | | | | | | | | | The time_put test doesn't seem to work on Linux and CloudABI. For Linux we already have an XFAIL. Closer inspection seems to reveal that this test does not pass for a couple of reasons. First of all, the tm_yday field is set to an invalid value. The strftime() function doesn't behave consistently across platforms in case the values in the tm structure are incoherent. Fix up this field to have the value 121, which corresponds with tm_mday, tm_mon and tm_year. This of course affects the output of time_put for some modifiers, so update the tests accordingly. Second, some of the tests actually use modifiers that are only present on BSD derived systems. They are not part of the C standard/POSIX. Simply remove them. Finally, some of the tests actually use invalid modifiers, causing a malformed format string to be passed to strftime(). Remove these tests as well. Differential Revision: http://reviews.llvm.org/D8349 llvm-svn: 233262
* Fix incorrect error handling of call to mbrtowc. This is PR#13759. Leaving ↵Marshall Clow2015-03-231-1/+1
| | | | | | the bug open because (1) I'm not sure that we're correct here, only better than before, and (2) no tests llvm-svn: 233012
* Remove unneeded redeclaration of reference_wrapper.Eric Fiselier2015-03-211-2/+0
| | | | llvm-svn: 232887
* Improve automatic detection of filetype for sym_checkEric Fiselier2015-03-201-1/+27
| | | | llvm-svn: 232858
* Fix use of incorrect package name in sym_checkEric Fiselier2015-03-201-1/+1
| | | | llvm-svn: 232856
* Add symbol checking script to libc++ to help manage exported symbols.Eric Fiselier2015-03-2010-0/+492
| | | | | | | | | | | | | | | | | Summary: Add symbol checking scripts for extracting a list of symbols from shared libraries and for comparing symbol lists for differences. Reviewers: mclow.lists, danalbert, EricWF Reviewed By: EricWF Subscribers: majnemer, emaste, cfe-commits Differential Revision: http://reviews.llvm.org/D4946 llvm-svn: 232855
* Create macro to allow testing of is_convertible without the compiler builtin.Eric Fiselier2015-03-191-1/+2
| | | | | | | | | | | | | | Summary: This patch also fixes one test case that failed in the library version of is_convertible. Reviewers: mclow.lists, EricWF Reviewed By: EricWF Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D8456 llvm-svn: 232764
* [libcxx] Unify LIBCXX_<ABI-Name>_INCLUDE_PATHS to be ↵Eric Fiselier2015-03-193-11/+32
| | | | | | | | | | | | | | | | | | | | | | LIBCXX_CXX_ABI_INCLUDE_PATHS Summary: Clean up all the different possible CMake options for specifying the ABI include paths into one CMake option named `LIBCXX_CXX_ABI_INCLUDE_PATHS`. The documentation has been updated to reflect this change. For the next week I have added explicit errors if any of the old flags is used. These errors inform users of the change and the new option to use. Before committing the change I will announce this change on cfe-dev. Reviewers: danalbert, mclow.lists Reviewed By: danalbert, mclow.lists Subscribers: jroelofs, cbergstrom, cfe-commits Differential Revision: http://reviews.llvm.org/D5039 llvm-svn: 232762
* Add code to honor the match_not_bol and match_not_eol regex flats. Fixes ↵Marshall Clow2015-03-193-2/+104
| | | | | | PR#22651. Thanks to Jim Porter for the report and suggested fix. llvm-svn: 232733
* Add support for kfreebsd. Thanks to Jan HenkeSylvestre Ledru2015-03-191-1/+1
| | | | | | | Reported on the Debian BTS: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=780106 llvm-svn: 232714
* Fix use after free and calls to operator comma in debug modeEric Fiselier2015-03-192-2/+2
| | | | llvm-svn: 232703
* [libc++] Fix PR22922 - Allocator support for std::function does not know how ↵Eric Fiselier2015-03-186-17/+34
| | | | | | | | | | | | | | | | | | | to rebind. Summary: This patch changes std::function to use allocator_traits to rebind the allocator instead of allocator itself. It also changes most of the tests to use `bare_allocator` where possible instead of `test_allocator`. Reviewers: mclow.lists Reviewed By: mclow.lists Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D8391 llvm-svn: 232686
* Provide std::abs(<floating-point>) in <cmath> on Solaris.Eric Fiselier2015-03-181-0/+4
| | | | | | | | | | | | | | | | 1) <cstdlib> header should define std::abs([int|long|long long]) functions. They use "using ::abs" to import these functions (which are declared in <stdlib.h>) into std namespace. 2) <cmath> header should define std::abs([float|double|long double]) function. If we try define new functions in std namespace, then it will cause compile error in <cstdlib> because "using ::abs" will try import not only [int|long|long long] functions, but also [float|double|long double] which are defined in <math.h> header on solaris. Patch by C Bergstrom. llvm-svn: 232641
* Fix DYNLD_LIBRARY_PATH to include the ABI path if specifiedEric Fiselier2015-03-171-13/+20
| | | | llvm-svn: 232527
* Fix failed test command repro printing for *.pass.cpp testsJonathan Roelofs2015-03-172-4/+8
| | | | | | | | Before we were printing out the compile command twice, which isn't that useful. Thanks EricWF for the report! llvm-svn: 232526
OpenPOWER on IntegriCloud