summaryrefslogtreecommitdiffstats
path: root/libcxx
Commit message (Collapse)AuthorAgeFilesLines
* Fix linking with just-built libc++abi (added in r214037).Alexey Samsonov2014-07-281-5/+8
| | | | | | | | Pass target name ("cxxabi") to target_link_libraries(cxx ...) to ensure that linker is able to locate just-built libc++abi in the build tree, instead of relying on "-lc++abi" linker flag. llvm-svn: 214114
* Fix PR#20471. Add a cast in __align_it to ensure that the bit twiddling is ↵Marshall Clow2014-07-281-1/+1
| | | | | | done at the correct size. A better solution, IMHO, would be to declare vector<bool>::__bits_per_word as 'size_type', rather than 'unsigned', but that's a possible ABI change. llvm-svn: 214088
* Better defaults for in-tree libc++ with cmake.Dan Albert2014-07-261-1/+11
| | | | | | | | | | | | This will detect if you are building libcxx in-tree and libcxxabi is available. If so, it will default to using the in-tree libcxxabi by setting LIBCXX_CXX_ABI to "libcxxabi", LIBCXX_LIBCXXABI_INCLUDE_PATHS to "${CMAKE_SOURCE_DIR}/projects/libcxxabi/include" and will add "cxxabi" as a proper dependency. Patch by Russell Harmon. llvm-svn: 214037
* [libcxx] expose experimental::erased_type for all standard versions.Eric Fiselier2014-07-243-13/+5
| | | | | | | | | | | | | | Summary: The polymorphic allocator implementation would greatly benefit by defining virtual functions in the dynlib instead of inline. In order to do that some types are going to have to be available outside of c++1y. This is the first step. Reviewers: mclow.lists, EricWF Reviewed By: EricWF Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4554 llvm-svn: 213889
* D4451: Fix copy/move issues casude by __tuple_leafs's converting constructorEric Fiselier2014-07-246-4/+116
| | | | llvm-svn: 213888
* test commitEric Fiselier2014-07-241-0/+1
| | | | llvm-svn: 213887
* Fix ctype_base::xdigit for Android.Dan Albert2014-07-231-0/+5
| | | | | | | Android's ctype implementation comes from openbsd, which for some reason doesn't consider numbers to be hex digits. llvm-svn: 213785
* Update the synopsis and comments with the results of LWG #2255. No code to ↵Marshall Clow2014-07-231-13/+13
| | | | | | back it up at the moment; just comments llvm-svn: 213768
* Fix classic_locale for Android.Dan Albert2014-07-221-1/+1
| | | | | | Android's classic_locale begins at _ctype_ + 1. llvm-svn: 213672
* Fix std::make_heap's worst case time complexityDavid Majnemer2014-07-222-55/+90
| | | | | | | | | | | | | | | | | std::make_heap is currently implemented by iteratively applying a siftup-type algorithm. Since sift-up is O(ln n), this gives std::make_heap a worst case time complexity of O(n ln n). The C++ standard mandates that std::make_heap make no more than O(3n) comparisons, this makes our std::make_heap out of spec. Fix this by introducing an implementation of __sift_down and switch std::make_heap to create the heap using it. This gives std::make_heap linear time complexity in the worst case. This fixes PR20161. llvm-svn: 213615
* make the same change as in 213546 for vector<bool>Marshall Clow2014-07-211-1/+1
| | | | llvm-svn: 213547
* In response to bug #20362, change the order of operations in vector move ↵Marshall Clow2014-07-211-1/+1
| | | | | | assignment so that if the allocator move assignment throws, we aren't left with two objects pointing at the same memory. This is not a complete fix; I am unconvinced that a complete fix is possible. With this change in place, we will leak the old contents of the vector. LWG issue #2106, when adopted, will make this problem illegal. Thanks to Thomas Koeppe for the report and analysis. llvm-svn: 213546
* Fix bug #20335 - memory leak when move-constructing a string with unequal ↵Marshall Clow2014-07-172-14/+26
| | | | | | allocator. Thanks to Thomas Koeppe for the report llvm-svn: 213269
* [libcxx] Add <experimental/utility> header for LFTS. Eric Fiselier2014-07-176-1/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds the `<experimental/utility>` header as specified in the latest draft of the library fundamentals TS. `<experimental/utility>` only contains `class erased_type`. This patch also updates the documentation to list the `erased_type` class as "initial implementation complete". Test Plan: Three test cases where added: 1. Test that `_LIBCPP_VERSION` is defined. 2. Test that `<utility>` has been included. 3. Test that `erased_type` is in the correct namespace and is constexpr default constructible. Reviewers: mclow.lists Reviewed By: mclow.lists Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4510 llvm-svn: 213226
* Change _LIBCXX_CONSTEXPR_AFTER_CXX11 to check for c++14 constexpr rulesEric Fiselier2014-07-171-2/+14
| | | | llvm-svn: 213225
* Test commit: Reverting whitespace changesEric Fiselier2014-07-171-1/+0
| | | | llvm-svn: 213223
* Test commit: whitespace changeEric Fiselier2014-07-171-0/+1
| | | | llvm-svn: 213222
* Correctly implement LWG 2049; std::is_destructible.Marshall Clow2014-07-165-36/+112
| | | | llvm-svn: 213163
* Change Windows decoration on some base classesSaleem Abdulrasool2014-07-161-2/+2
| | | | | | | | | | | Mark the base classes for time_get_byname and time_get as _LIBCPP_TYPE_VIS_ONLY rather than _LIBCPP_TYPE_VIS. These base classes are templated types and cannot be stored with export dll storage. Fixes compilation with _LIBCPP_DLL for Windows when the time_get and time_get_byname classes are used. llvm-svn: 213116
* Support the built-in type-trait support in gcc 4.7 and later. Thanks to ↵Marshall Clow2014-07-101-46/+42
| | | | | | Albert Wong for the patch. llvm-svn: 212727
* Add support for BIONIC C library (Android). Patch from Dan AlbertMarshall Clow2014-07-105-12/+217
| | | | llvm-svn: 212724
* Fix warning in test - missing exception specifier for overload of operator newMarshall Clow2014-07-101-1/+1
| | | | llvm-svn: 212723
* Add a reset method to the counting predicates in the test suiteMarshall Clow2014-07-091-1/+3
| | | | llvm-svn: 212651
* string_view enhancements. Move to the correct namespace. Better constexpr ↵Marshall Clow2014-07-083-12/+37
| | | | | | support (thanks to Richard for the suggestions). Update the tests to match this. Add <experimental/__config for experimental macros/etc to live. llvm-svn: 212569
* Fix some failing tests for the standard containers. The tests were failing ↵Marshall Clow2014-07-0812-111/+135
| | | | | | in 32-bit mode because they assumed that std::size_type and make_unsigned<ptrdiff_t>::type were always the same type. No change to libc++, just the tests. llvm-svn: 212538
* Minor cleanup for string_view; mostly from suggestions by Richard Smith. ↵Marshall Clow2014-07-029-45/+46
| | | | | | Also, make the tests pass under c++03 llvm-svn: 212185
* Fix libc++ bug #20039: 'Constructing std::function from empty compatible ↵Marshall Clow2014-06-304-5/+46
| | | | | | std::function results in half-empty state' Thanks to Agustin Berge for the report, and for his and Eric Fiselier's work on a fix. llvm-svn: 212070
* Fix a typo in the noexcept calculation for __compressed_pair::swap. Thanks ↵Marshall Clow2014-06-301-6/+6
| | | | | | to EricWF for the bug report and the fix. llvm-svn: 212046
* Add checking for the complexity guarantees in the standardMarshall Clow2014-06-301-0/+16
| | | | llvm-svn: 212017
* Patch from Albert J. Wong to make type_traits take advantage of gcc ↵Marshall Clow2014-06-262-7/+16
| | | | | | intrinsics in 4.7 and later. No functionality change when using clang. llvm-svn: 211755
* eliminate install of duplicate headers (take 2)David Fang2014-06-243-24/+17
| | | | | | Patch by Ryuta Suzuki llvm-svn: 211629
* Some calls to get<>() were qualified. Some were not. Qualify them all. Fixes ↵Marshall Clow2014-06-245-25/+25
| | | | | | bug #20092. Thanks to Agustín Bergé for the bug report and the fix. llvm-svn: 211563
* Formatting improvements in the <string_view> synopsis suggested by RSmith. ↵Marshall Clow2014-06-181-112/+111
| | | | | | No functionality change. llvm-svn: 211191
* Revert "fixes duplicate header installation"David Fang2014-06-121-1/+5
| | | | | | This reverts commit 0bd40d6c3da6719fecf77038673d453ff1eab25b. llvm-svn: 210857
* Implement string_view from the library fundamentals TS (n4023). Also works ↵Marshall Clow2014-06-1180-0/+16908
| | | | | | in C++11 and 03, with reduced functionality (mostly in the area of constexpr) llvm-svn: 210659
* fixes duplicate header installationDavid Fang2014-06-101-5/+1
| | | | | | | http://llvm.org/bugs/show_bug.cgi?id=18681 Patch by Ryuta Suzuki <oroppas gmail com> llvm-svn: 210577
* Mark assign to be constepr only in c++14; can't have constexpr fns that ↵Marshall Clow2014-06-101-1/+1
| | | | | | return void in C++11 llvm-svn: 210562
* Make the helper routines in string really be constexpr. This required a bit ↵Marshall Clow2014-06-102-48/+60
| | | | | | of refacoring in algorithm as well. Give them better names while we're at it. All of these are internal rotines; no visible functionality change. llvm-svn: 210561
* A bunch of the char.traits tests were using unicode literals. #ifdef those ↵Marshall Clow2014-06-1018-0/+36
| | | | | | bits out on c++03, since it doesn't support u"" and U "" style strings. llvm-svn: 210560
* Update Arcanist config to point to reviews.llvm.orgDavid Blaikie2014-06-101-1/+1
| | | | llvm-svn: 210558
* Fixed damaged row in issues table; thanks to STL for the catchMarshall Clow2014-06-091-1/+1
| | | | llvm-svn: 210500
* Testing infastructure: A template for char_traits where all the functions ↵Marshall Clow2014-06-062-0/+185
| | | | | | are constexpr, and a comparison predicate which counts how many times it's been called. llvm-svn: 210381
* Since we now have a value for __cplusplus for c++14, teach libc++ about itMarshall Clow2014-06-061-1/+3
| | | | llvm-svn: 210380
* Use __builtin_operator_new/__builtin_operator_delete when available. ThisRichard Smith2014-06-046-26/+55
| | | | | | allows allocations and deallocations to be optimized out. llvm-svn: 210211
* Handle partial nanosleeps in this_thread::sleep_forDavid Majnemer2014-06-042-1/+23
| | | | | | | | | | Signals may result in nanosleep returning with only some of the requested sleeping performed. Utilize nanosleep's "time-remaining" out parameter to continue sleeping when this occurs. llvm-svn: 210210
* Make meta.trans.other/aligned_storage.pass.cpp pass on arm.Nico Weber2014-06-041-3/+11
| | | | | | | The maximum alignment on arm is 8, not 16 like on x86. Use alignof(max_align_t) to make the test work in both cases. llvm-svn: 210195
* Make locales (and transitively, std::endl) work reliably with gcc.Nico Weber2014-06-042-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | libc++ currently relies on undefined initialization order of global initializers when using gcc: 1. __start_std_streams in iostream.cpp calls locale::id::_init, which assigns an id to each locale::facet in an initializer 2. Every facet has a static locale::id id, whose constructor sets the facet's id to 0 If 2 runs after 1, it clobbers the facet's assigned consecutive id, causing exceptions to be thrown when e.g. running code like "cout << endl". To fix this, let _LIBCPP_CONSTEXPR evaluate to "constexpr" instead of nothing with gcc. locale::id's constructor is marked _LIBCPP_CONSTEXPR, which ensures that it won't get an initializer that could potentially run after the iostream.cpp initializer. (This remains broken when building with msvc.) Also switch constexpr-specific code in bitset to use __SIZEOF_SIZE_T__ instead of __SIZE_WIDTH__, because gcc doesn't define the latter. Pair-programmed/debugged with Dana Jansens. llvm-svn: 210188
* Add a note about debug mode being non-functionalMarshall Clow2014-06-041-0/+6
| | | | llvm-svn: 210162
* [libc++] Don't return uninitialized data from random_device::operator()David Majnemer2014-06-032-3/+30
| | | | | | | | | | Make sure we appropriately retry calls to read if the return result is less than what we asked for. Additionally, check and handle IO errors: EINTR results in the read operation getting restarted; other errors turn into exceptions. llvm-svn: 210061
* [libc++] random_device fails if open returns zeroDavid Majnemer2014-06-032-1/+12
| | | | | | | | | | | | | random_device::random_device(const string&) wrongly assumes that open can only validly return a file descriptor greater than zero. This results in random_device believing that it didn't successfully open the device causing it to throw in it's constructor, this ends up leaking a file descriptor. The fix is simple, don't error on file descriptors which are zero. llvm-svn: 210060
OpenPOWER on IntegriCloud