Howard Hinnant
e9df0a5c6c
Nico Rieck: Currently _MSC_VER and _WIN32 are used to guard code which is
...
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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187593 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-01 18:17:34 +00:00
Howard Hinnant
b87922c2c5
Glen: Minor tweaks to locale.cpp to help it compile with exceptions turned off.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187332 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-28 18:20:00 +00:00
Howard Hinnant
ed14a76beb
Add some friendly messages to libcxx calls to abort().
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@186951 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-23 16:05:56 +00:00
Howard Hinnant
171771a9f5
War on tabs.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185865 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-08 21:06:38 +00:00
Howard Hinnant
0769e6a785
Windows port for __codecvt_utf8<wchar_t>.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185849 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-08 19:03:07 +00:00
Joerg Sonnenberger
9a06b9d017
Don't free the C locale on NetBSD.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185467 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-02 19:46:18 +00:00
Howard Hinnant
725ae713f2
Windows support in thread::hardware_concurrency.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185451 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-02 17:53:48 +00:00
Howard Hinnant
312926eed4
Matthew Dempsky: POSIX defines that the _POSIX_C_SOURCE macros are to be set 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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185275 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-30 00:14:43 +00:00
Howard Hinnant
09ca5d49e1
Matthew Dempsky: Same as stdexcept.cpp in libc++abi: we've already computed 'len strlen(msg)', so we can use memcpy() instead of strcpy().
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185274 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-29 23:53:20 +00:00
Joerg Sonnenberger
a71a952634
Add NetBSD support.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@182162 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-17 21:17:34 +00:00
Joerg Sonnenberger
67444034ed
Create a weak pthread_create reference on NetBSD to not force a
...
dependency on libpthread for code that doesn't use threads itself.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@182161 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-17 21:16:18 +00:00
Howard Hinnant
9e98b34a8c
Glen: This patch gets the string conversion functions working on Windows. It also refactors repetitive code in string.cpp do greatly reduce the repetitiveness, increasing maintainability.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@182026 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-16 17:13:40 +00:00
Joerg Sonnenberger
be764c946c
Don't try to free the C locale.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@181559 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-09 23:06:35 +00:00
Joerg Sonnenberger
5328cd307c
Initialize codecvt explicitly with the C locale, which might not be 0.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@181534 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-09 19:00:18 +00:00
Joerg Sonnenberger
e58bc12f2a
The push/pop variant of pragma GCC diagnostic is only supported by Clang
...
and GCC 4.6 and newer, so protect accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180943 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-02 19:34:26 +00:00
Joerg Sonnenberger
63d8f7e341
Add explicit casts to unsigned char before calling ctype functions.
...
Fixes the value range on platforms with signed char.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180940 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-02 19:17:48 +00:00
Joerg Sonnenberger
912438c272
Use static_cast.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180680 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-27 19:13:31 +00:00
Joerg Sonnenberger
d3b5b6b9f4
Use reinterpret_casts directly in place of C-style casts.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180679 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-27 19:12:36 +00:00
Joerg Sonnenberger
006ab1e213
Only use Clang pragma when compiling with clang.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180678 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-27 19:10:15 +00:00
Joerg Sonnenberger
df4182153c
Fix typos.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180598 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-26 09:40:18 +00:00
Howard Hinnant
6dcaf3ee1a
Fix bug in __libcpp_db::__iterator_copy. Add debug test for swaping lists.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178892 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-05 17:58:52 +00:00
Howard Hinnant
cf31d3864e
Reference: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130325/077133.html
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178581 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-02 22:14:51 +00:00
Howard Hinnant
f6bdda044c
Reference: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130325/077132.html
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178545 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-02 15:48:56 +00:00
Howard Hinnant
a1985ebbc8
Reference: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130325/077131.html
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178544 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-02 15:46:31 +00:00
Howard Hinnant
fc2f021bdd
Bruce Mitchener, Jr.: Port to emscripten. Fixes http://llvm.org/bugs/show_bug.cgi?id=15624 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178354 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-29 18:27:28 +00:00
Howard Hinnant
db4d478ff4
Fix a few warnings/errors for compiling with -fno-exceptions.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178267 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-28 18:56:26 +00:00
Howard Hinnant
b74309e3ad
Marshall Clow found this memory problem in strstream using -fsanitize=address on the test suite.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177452 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-19 22:16:57 +00:00
Howard Hinnant
903439f735
This is an optimization which produces improved launching time. There should be no functionality change. Clients should see no ABI differences.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177443 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-19 21:34:48 +00:00
Marshall Clow
53e2763966
Removed raw references to __sun__, __FreeBSD__, __GLIBC__ and __linux__; now just check to see if they are defined.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177310 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18 19:34:07 +00:00
Marshall Clow
dece7fe670
Removed raw references to __APPLE__; now just check to see if it is defined.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177297 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18 17:45:34 +00:00
Marshall Clow
a22d2addb1
Removed raw references to _WIN32; now just check to see if it is defined.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177291 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18 17:04:29 +00:00
Howard Hinnant
e33c2d1926
This should be nothing but a load-time optimization. I'm trying to reduce load time initializers and this is a big one. No visible functionality change intended.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177212 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-16 00:17:53 +00:00
Howard Hinnant
83eade6abb
No functionality change at this time. I've split _LIBCPP_VISIBLE up into two flags: _LIBCPP_TYPE_VIS and _LIBCPP_FUNC_VIS. This is in preparation for taking advantage of clang's new __type_visibility__ attribute.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@176593 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-06 23:30:19 +00:00
Marshall Clow
b18165e704
Belt and suspenders when calling sysconf
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174642 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 18:48:09 +00:00
Marshall Clow
d854ce6bfa
Another libc++ warning suppression on Linux; no functionality change
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174637 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 17:37:58 +00:00
Marshall Clow
9ae96d0f21
More libc++ warning suppression on Linux; no functionality change
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174636 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 17:20:56 +00:00
Marshall Clow
88c3190d6c
Clean up some warnings for Linux build; No functionality change
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174611 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 14:22:51 +00:00
Howard Hinnant
54e2fff2e1
Saleem Abdulrasool: If errno is defined as volatile int, the qualifier 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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@173172 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-22 17:26:08 +00:00
Howard Hinnant
e0f0bfb5e6
Saleem Abdulrasool: __terminate_handler and __unexpected_handler are defined 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++.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@173165 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-22 14:48:10 +00:00
Howard Hinnant
1b031c947f
Fix a race in the construction of future. This fixes http://llvm.org/bugs/show_bug.cgi?id=14934 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@172456 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-14 20:01:24 +00:00
Howard Hinnant
3e3ae9ec41
Fix string conversions functions to throw out_of_range properly. Fixes http://llvm.org/bugs/show_bug.cgi?id=14919 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@172447 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-14 18:59:43 +00:00
Howard Hinnant
21772ec063
Saleem Abdulrasool: GCC complains about the template functions as 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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171202 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-28 18:15:01 +00:00
Howard Hinnant
5f767b7b28
Saleem Abdulrasool: cleanup a few more compile warnings emitted by GCC.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171173 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-27 23:24:31 +00:00
Howard Hinnant
bf68bdc4ed
Saleem Abdulrasool: avoid hardcoding buffer lengths.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171169 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-27 21:17:53 +00:00
Howard Hinnant
0aa900e94f
Saleem Abdulrasool: Silence warning and reduce unnecessary code in hash.cpp.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171167 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-27 18:59:05 +00:00
Howard Hinnant
c6e54b964f
Saleem Abdulrasool: This just rounds up a few compile warnings emitted by GCC (4.7.2).
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171165 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-27 18:46:00 +00:00
Chad Rosier
27c836ff3a
Remove redundant inits. Patch by Eitan Adler.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@170967 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-22 00:12:05 +00:00
Howard Hinnant
0a69fa14d2
Zhang Xiongpang: Add definitions for const data members. Fixes http://llvm.org/bugs/show_bug.cgi?id=14585 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@170026 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-12 21:14:28 +00:00
Michael J. Spencer
a358fbe504
[CMake] Add support for selecting which c++ abi library to use.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@169036 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-30 21:02:29 +00:00
Howard Hinnant
9c0df1416f
Rename uses of _ and __ because these are getting stepped on by macros from other system code.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@167038 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-30 19:06:59 +00:00