summaryrefslogtreecommitdiffstats
path: root/libcxx/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix bug in __libcpp_db::__iterator_copy. Add debug test for swaping lists.Howard Hinnant2013-04-051-3/+2
| | | | llvm-svn: 178892
* Reference: ↵Howard Hinnant2013-04-021-26/+99
| | | | | | http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130325/077133.html llvm-svn: 178581
* Reference: ↵Howard Hinnant2013-04-021-0/+2
| | | | | | http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130325/077132.html llvm-svn: 178545
* Reference: ↵Howard Hinnant2013-04-021-5/+14
| | | | | | http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130325/077131.html llvm-svn: 178544
* Bruce Mitchener, Jr.: Port to emscripten. Fixes ↵Howard Hinnant2013-03-293-10/+34
| | | | | | http://llvm.org/bugs/show_bug.cgi?id=15624. llvm-svn: 178354
* Fix a few warnings/errors for compiling with -fno-exceptions.Howard Hinnant2013-03-285-2/+23
| | | | llvm-svn: 178267
* Marshall Clow found this memory problem in strstream using ↵Howard Hinnant2013-03-191-0/+2
| | | | | | -fsanitize=address on the test suite. llvm-svn: 177452
* This is an optimization which produces improved launching time. There ↵Howard Hinnant2013-03-191-6/+8
| | | | | | should be no functionality change. Clients should see no ABI differences. llvm-svn: 177443
* Removed raw references to __sun__, __FreeBSD__, __GLIBC__ and __linux__; now ↵Marshall Clow2013-03-181-1/+1
| | | | | | just check to see if they are defined. llvm-svn: 177310
* Removed raw references to __APPLE__; now just check to see if it is defined.Marshall Clow2013-03-185-8/+8
| | | | llvm-svn: 177297
* Removed raw references to _WIN32; now just check to see if it is defined.Marshall Clow2013-03-183-10/+10
| | | | llvm-svn: 177291
* This should be nothing but a load-time optimization. I'm trying to reduce ↵Howard Hinnant2013-03-161-1/+9
| | | | | | load time initializers and this is a big one. No visible functionality change intended. llvm-svn: 177212
* No functionality change at this time. I've split _LIBCPP_VISIBLE up into ↵Howard Hinnant2013-03-061-2/+2
| | | | | | two flags: _LIBCPP_TYPE_VIS and _LIBCPP_FUNC_VIS. This is in preparation for taking advantage of clang's new __type_visibility__ attribute. llvm-svn: 176593
* Belt and suspenders when calling sysconfMarshall Clow2013-02-071-1/+3
| | | | llvm-svn: 174642
* Another libc++ warning suppression on Linux; no functionality changeMarshall Clow2013-02-071-1/+1
| | | | llvm-svn: 174637
* More libc++ warning suppression on Linux; no functionality changeMarshall Clow2013-02-071-2/+6
| | | | llvm-svn: 174636
* Clean up some warnings for Linux build; No functionality changeMarshall Clow2013-02-071-43/+50
| | | | llvm-svn: 174611
* Saleem Abdulrasool: If errno is defined as volatile int, the qualifier ↵Howard Hinnant2013-01-221-16/+16
| | | | | | | | | | | differences can cause template typename deductions on swap<> (used in string.cpp). Use decltype(errno) to replicate the type and qualifier information for holding the errno value. Because errno is expected to be assignable, there is no need to use typename std::remove_const<decltype(errno)>::type to hold the value. llvm-svn: 173172
* Saleem Abdulrasool: __terminate_handler and __unexpected_handler are defined ↵Howard Hinnant2013-01-221-1/+1
| | | | | | | | | but not used when building against libsupc++ as the functions for which they are used are provided by libsupc++. Simply preprocess them away when building against libsupc++. llvm-svn: 173165
* Fix a race in the construction of future. This fixes ↵Howard Hinnant2013-01-141-1/+1
| | | | | | http://llvm.org/bugs/show_bug.cgi?id=14934. llvm-svn: 172456
* Fix string conversions functions to throw out_of_range properly. Fixes ↵Howard Hinnant2013-01-141-58/+66
| | | | | | http://llvm.org/bugs/show_bug.cgi?id=14919. llvm-svn: 172447
* Saleem Abdulrasool: GCC complains about the template functions as ↵Howard Hinnant2012-12-281-28/+5
| | | | | | | | | potentially not being able to be inlined. These do not need to be always-inlined for ABI stability because they are not exported beyond this source due to the unnamed namespace. Also simplified use of the Wmissing-field-initializers pragma as was done for clang. llvm-svn: 171202
* Saleem Abdulrasool: cleanup a few more compile warnings emitted by GCC.Howard Hinnant2012-12-272-2/+35
| | | | llvm-svn: 171173
* Saleem Abdulrasool: avoid hardcoding buffer lengths.Howard Hinnant2012-12-272-44/+61
| | | | llvm-svn: 171169
* Saleem Abdulrasool: Silence warning and reduce unnecessary code in hash.cpp.Howard Hinnant2012-12-271-8/+13
| | | | llvm-svn: 171167
* Saleem Abdulrasool: This just rounds up a few compile warnings emitted by ↵Howard Hinnant2012-12-272-14/+13
| | | | | | GCC (4.7.2). llvm-svn: 171165
* Remove redundant inits. Patch by Eitan Adler.Chad Rosier2012-12-221-3/+0
| | | | llvm-svn: 170967
* Zhang Xiongpang: Add definitions for const data members. Fixes ↵Howard Hinnant2012-12-122-0/+26
| | | | | | http://llvm.org/bugs/show_bug.cgi?id=14585. llvm-svn: 170026
* [CMake] Add support for selecting which c++ abi library to use.Michael J. Spencer2012-11-301-3/+3
| | | | llvm-svn: 169036
* Rename uses of _ and __ because these are getting stepped on by macros from ↵Howard Hinnant2012-10-301-3/+3
| | | | | | other system code. llvm-svn: 167038
* Some minor mingw64 porting tweaks from Glen.Howard Hinnant2012-09-031-2/+7
| | | | llvm-svn: 163120
* Change sleep_for, sleep_until, and the condition_variable timed waitHoward Hinnant2012-08-302-5/+29
| | | | | | | | | | | | | functions to protect against duration and time_point overflow. Since we're about to wait anyway, we can afford to spend a few more cycles on this checking. I purposefully did not treat the timed try_locks with overflow checking. This fixes http://llvm.org/bugs/show_bug.cgi?id=13721 . I'm unsure if the standard needs clarification in this area, or if this is simply QOI. The <chrono> facilities were never intended to overflow check, but just to not overflow if durations stayed within +/- 292 years. llvm-svn: 162925
* Wrap throw in _LIBCPP_NO_EXCEPTIONS in debug.cpp. Calls abort if can't ↵Howard Hinnant2012-08-241-0/+20
| | | | | | throw an exception. Fixes http://llvm.org/bugs/show_bug.cgi?id=13082. llvm-svn: 162613
* Patch contributed by Dev Dude for mingw64 port.Howard Hinnant2012-08-191-0/+3
| | | | llvm-svn: 162188
* Change size of reference count field in __libcpp_nmstr from 32 bits to 64 ↵Howard Hinnant2012-08-081-3/+3
| | | | | | bits for 64 bit targets. This is controls the data layout of all exceptions defined in <stdexcept>. This aligns the ABI with that of gcc-4.2. llvm-svn: 161497
* Andrew Morrow: The attached patch updates the initialization of the 'struct ↵Howard Hinnant2012-08-021-1/+1
| | | | | | | | | | tm' in __time_get_storage<char> to match the initialization behavior in __time_get_storage<wchar>. Without the initialization, valgrind reports errors in the subsequent calls to strftime_l. llvm-svn: 161196
* Andrew Morrow: Among the various libc++ tests that currently don't pass on ↵Howard Hinnant2012-08-021-22/+21
| | | | | | | | | | | | | | | | Linux are localization/locale.categories/category.collate/category.ctype/locale.ctype.byname/is_1.pass.cpp and scan_is.pass.cpp. The tests fail when the character class being tested is compound, like ctype_base::alnum or ctype_base::graph, because the existing series of conditionals in do_is an do_scan_is will abort too early. For instance, if the character class being tested is alnum, and the character is numeric, do_is will return false because iswalpha_l will return false, 'result' becomes false, and the 'true' result from the later call to iswdigit_l ends up being ignored . A similar problem exists in do_scan_is. llvm-svn: 161192
* Andrew Morrow: The attached patch is an attempt to implementHoward Hinnant2012-08-021-2/+11
| | | | | | | std::thread::hardware_concurrency for platforms that don't offer sysctl, but do provide a POSIX sysconf and _SC_NPROCESSORS_ONLN. llvm-svn: 161190
* Despite my pathological distrust of spin locks, the number just don't lie. ↵Howard Hinnant2012-07-301-2/+13
| | | | | | I've put a small spin in __sp_mut::lock() on std::mutex::try_lock(), which is testing quite well. In my experience, putting in a yield for every failed iteration is also a major performance booster. This change makes one of the performance tests I was using (a highly contended one) run about 20 times faster. llvm-svn: 160967
* Implement [util.smartptr.shared.atomic]. This is the last unimplementedHoward Hinnant2012-07-301-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | section in libc++. This requires a recompiled dylib. Failure to rebuild the dylib will result in a link-time error if and only if the functions from [util.smartptr.shared.atomic] are used. The implementation is not lock free. After considerable thought, I know of no way to make the implementation lock free. Ideas welcome along that front. But changing the ABI of shared_ptr is not on the table at this point. The mutex used to lock these function is encapsulated by std::__sp_mut. The only thing the client knows about std::__sp_mut is that it has a void* data member, can't be constructed, and has lock and unlock members. Within the binary __sp_mut is currently implemented as a pointer to a std::mutex. That can change in the future without disturbing the ABI (as long as sizeof(__sp_mut) remains constant. I specifically did not make __sp_mut a spin lock as I have a pathological distrust of spin locks. Testing on OS X reveals that the use of std::mutex in this role is not a large performance penalty as long as the contention for the mutex is low (more likely to get the lock than to have to wait). In the future we can still make __sp_mut a spin lock if that is what is desired (without ABI damage). The dylib contains 16 __sp_mut's to be chosen based on the hash of the address of the shared_ptr. The constant 16 is a ball-park reasonable space/time tradeoff. std::hash<T*> was changed to call __murmur2_or_cityhash, instead of the identity function. I had thought we had already done this, but I was mistaken. All of this is under #if __has_feature(cxx_atomic) even though the implementation is not lock free, because the signatures require access to std::memory_order, which is currently available only under __has_feature(cxx_atomic). llvm-svn: 160940
* Patch by Andrew C. Morrow: Conditionally include cxxabi.h in new.cpp and ↵Howard Hinnant2012-07-262-1/+17
| | | | | | | | | | | | typeinfo.cpp. Both new.cpp and typeinfo.cpp have code that is conditionally compiled based on the LIBCXXRT and _LIBCPPABI_VERSION defines, but those files do not currently include <cxxabi.h> in the non __APPLE__ case. The attached patch updates those files so that for non __APPLE__ builds <cxxabi.h> is included if available or if LIBCXXRT is set. I'm modeling this on the recent updates to exception.cpp. llvm-svn: 160790
* libc++: switch from using _ATTRIBUTE(noreturn) (which conflicts with aRichard Smith2012-07-261-4/+4
| | | | | | platform-provided macro on some systems) to _LIBCPP_NORETURN. llvm-svn: 160773
* noexcept applied to <future>.Howard Hinnant2012-07-211-1/+1
| | | | llvm-svn: 160607
* noexcept applied to <thread>.Howard Hinnant2012-07-211-1/+1
| | | | llvm-svn: 160606
* noexcept applied to <condition_variable>.Howard Hinnant2012-07-211-2/+2
| | | | llvm-svn: 160605
* noexcept and constexpr applied to <mutex>.Howard Hinnant2012-07-211-8/+9
| | | | llvm-svn: 160604
* noexcept and constexpr applied to <ios>.Howard Hinnant2012-07-211-1/+1
| | | | llvm-svn: 160593
* noexcept applied to <random>.Howard Hinnant2012-07-201-1/+1
| | | | llvm-svn: 160579
* Teach libc++ to check for libc++abi and use its features if they're available.Richard Smith2012-07-111-8/+11
| | | | llvm-svn: 160038
* Appy constexpr to <memory>. Picked up a few missing noexcepts as well.Howard Hinnant2012-07-071-0/+1
| | | | llvm-svn: 159902
OpenPOWER on IntegriCloud