summaryrefslogtreecommitdiffstats
path: root/libcxx/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Debug mode for string. This commit also marks the first time libc++ ↵Howard Hinnant2013-08-231-41/+65
| | | | | | debug-mode has found a bug (found one in regex). Had to play with extern templates a bit to get this to work since string is heavily used within libc++.dylib. llvm-svn: 189114
* Glen: replace obsolete _LIBCPP_CANTTHROW with _NOEXCEPT.Howard Hinnant2013-08-221-5/+5
| | | | llvm-svn: 189046
* LWG 2145 - mark constructor for std::error_category as inline and constexpr. ↵Marshall Clow2013-08-211-0/+1
| | | | | | Leave the (existing, out-of-line, non-constexpr) in the dylib for compatibility with existing programs) llvm-svn: 188858
* Xing Xue: port to IBM XLC++/AIX.Howard Hinnant2013-08-142-2/+4
| | | | llvm-svn: 188396
* Fix signed/unsigned warnings when building libc++ in C++14 modeMarshall Clow2013-08-141-3/+3
| | | | llvm-svn: 188395
* Nico Rieck: this patch series fixes visibility issues on Windows as ↵Howard Hinnant2013-08-121-8/+8
| | | | | | explained in <http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-August/031214.html>. llvm-svn: 188192
* Ok, 3 major changes for debug mode in one commit:Howard Hinnant2013-08-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. I had been detecting and trapping iterator == and \!= among iterators in different containers as an error. But the trapping itself is actually an error. Consider: #include <iostream> #include <vector> #include <algorithm> template <class C> void display(const C& c) { std::cout << "{"; bool first = true; for (const auto& x : c) { if (\!first) std::cout << ", "; first = false; std::cout << x; } std::cout << "}\n"; } int main() { typedef std::vector<int> V; V v1 = {1, 3, 5}; V v2 = {2, 4, 6}; display(v1); display(v2); V::iterator i = std::find(v1.begin(), v1.end(), 1); V::iterator j = std::find(v2.begin(), v2.end(), 2); if (*i == *j) i = j; // perfectly legal // ... if (i \!= j) // the only way to check v2.push_back(*i); display(v1); display(v2); } It is legal to assign an iterator from one container to another of the same type. This is required to work. One might want to test whether or not such an assignment had been made. The way one performs such a check is using the iterator's ==, \!= operator. This is a logical and necessary function and does not constitute an error. 2. I had a header circular dependence bug when _LIBCPP_DEBUG2 is defined. This caused a problem in several of the libc++ tests. Fixed. 3. There is a serious problem when _LIBCPP_DEBUG2=1 at the moment in that std::basic_string is inoperable. std::basic_string uses __wrap_iterator to implement its iterators. __wrap_iterator has been rigged up in debug mode to support vector. But string hasn't been rigged up yet. This means that one gets false positives when using std::string in debug mode. I've upped std::string's priority in www/debug_mode.html. llvm-svn: 187636
* Nico Rieck: Currently _MSC_VER and _WIN32 are used to guard code which isHoward Hinnant2013-08-012-25/+25
| | | | | | | | | | | | | | | | | | | | | | MSVC-specific, MSVCRT-specific, or Windows-specific. Because Clang can also define _MSC_VER, and MSVCRT is not necessarily the only C runtime, these macros should not be used interchangeably. This patch divides all Windows-related bits into the aforementioned categories. Two new macros are introduced: - _LIBCPP_MSVC: Defined when compiling with MSVC. Detected using _MSC_VER, excluding Clang. - _LIBCPP_MSVCRT: Defined when using the Microsoft CRT. This is the default when _WIN32 is defined. This leaves _WIN32 for code using the Windows API. This also corrects the spelling of _LIBCP_HAS_IS_BASE_OF to _LIBCPP_HAS_IS_BASE_OF. Nico, please prepare a patch for CREDITS.TXT, thanks. llvm-svn: 187593
* Glen: Minor tweaks to locale.cpp to help it compile with exceptions turned off.Howard Hinnant2013-07-281-2/+3
| | | | llvm-svn: 187332
* Add some friendly messages to libcxx calls to abort().Howard Hinnant2013-07-233-0/+13
| | | | llvm-svn: 186951
* War on tabs.Howard Hinnant2013-07-081-3/+3
| | | | llvm-svn: 185865
* Windows port for __codecvt_utf8<wchar_t>.Howard Hinnant2013-07-081-0/+19
| | | | llvm-svn: 185849
* Don't free the C locale on NetBSD.Joerg Sonnenberger2013-07-021-1/+1
| | | | llvm-svn: 185467
* Windows support in thread::hardware_concurrency.Howard Hinnant2013-07-021-0/+7
| | | | llvm-svn: 185451
* Matthew Dempsky: POSIX defines that the _POSIX_C_SOURCE macros are to be set ↵Howard Hinnant2013-06-301-3/+3
| | | | | | | | | | | | | | | | | | | | by user code to specify what version of POSIX the system should provide. If you want to check what version of POSIX is actually available, you're supposed to test _POSIX_VERSION. However, since sysconf() has been in POSIX since 1995, it's probably safe to assume it's available on any system with a C++11 compiler, especially if _SC_NPROCESSORS_ONLN is defined too. So no point in a complicated preprocessor rule if just we unconditionally include <unistd.h> (on non-Windows systems). Also, I've added a #warning for to help porters detect when a suitable implementation isn't detected at compile-time. Howard: Matthew, can you patch CREDITS.TXT? Thanks. llvm-svn: 185275
* Matthew Dempsky: Same as stdexcept.cpp in libc++abi: we've already computed ↵Howard Hinnant2013-06-291-1/+1
| | | | | | 'len strlen(msg)', so we can use memcpy() instead of strcpy(). llvm-svn: 185274
* Add NetBSD support.Joerg Sonnenberger2013-05-171-9/+30
| | | | llvm-svn: 182162
* Create a weak pthread_create reference on NetBSD to not force aJoerg Sonnenberger2013-05-171-0/+4
| | | | | | dependency on libpthread for code that doesn't use threads itself. llvm-svn: 182161
* Glen: This patch gets the string conversion functions working on Windows. ↵Howard Hinnant2013-05-163-511/+367
| | | | | | It also refactors repetitive code in string.cpp do greatly reduce the repetitiveness, increasing maintainability. llvm-svn: 182026
* Don't try to free the C locale.Joerg Sonnenberger2013-05-091-1/+1
| | | | llvm-svn: 181559
* Initialize codecvt explicitly with the C locale, which might not be 0.Joerg Sonnenberger2013-05-091-1/+1
| | | | llvm-svn: 181534
* The push/pop variant of pragma GCC diagnostic is only supported by ClangJoerg Sonnenberger2013-05-021-0/+4
| | | | | | and GCC 4.6 and newer, so protect accordingly. llvm-svn: 180943
* Add explicit casts to unsigned char before calling ctype functions.Joerg Sonnenberger2013-05-021-4/+4
| | | | | | Fixes the value range on platforms with signed char. llvm-svn: 180940
* Use static_cast.Joerg Sonnenberger2013-04-271-5/+8
| | | | llvm-svn: 180680
* Use reinterpret_casts directly in place of C-style casts.Joerg Sonnenberger2013-04-271-4/+4
| | | | llvm-svn: 180679
* Only use Clang pragma when compiling with clang.Joerg Sonnenberger2013-04-271-0/+2
| | | | llvm-svn: 180678
* Fix typos.Joerg Sonnenberger2013-04-261-2/+2
| | | | llvm-svn: 180598
* 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
OpenPOWER on IntegriCloud