Howard Hinnant
5a8b5783f8
G M: The attached patch is for libcxx's new.cpp and __config files. The patch's intent is to make new.cpp compile using MS's cl.exe compiler without changing the meaning of anything for any other compiler.
...
The issue this patch seeks to address is that MS's compiler (cl.exe) doesn't support the __attribute__((__weak__)) or __atribute__((__visibility__("default")) syntax; so a solution must be found where cl.exe doesn't see this syntax.
This patch seeks to solve this problem by changing code patterned like this:
__attribute__((__weak__, __visibility__("default")))
void* operator new(size_t size, const std::nothrow_t&) _NOEXCEPT { /*snip*/; return p; }
to code like this:
_LIBCPP_WEAK
void* operator new(size_t size, const std::nothrow_t&) _NOEXCEPT { return p; }
Howard: Thanks for all the comments regarding the default visibility
tag on the definition. I agree it isn't needed, and that there are lots
of other places where it is missing. That being said, I'm not wanting
to rock the boat on that issue right now. So I've added it back to the
definition via _LIBCPP_FUNC_VIS. A later pass dedicated just to this
issue can bring things in to a consistent state one way or the other.
Note that we do not want to have the exact same attributes on the
declaration and defintion in this case. The declaration should not be
marked weak, whereas the definition should (which is what G M's patch
did). I've fully tested on OS X to ensure that the resultant attribute
syntax actually works.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@192007 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-04 23:56:37 +00:00
Howard Hinnant
9844b6796b
G M: A small patch to fix a couple of warnings in stdexcept.cpp for cl.exe which does not support #pragma visibility.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191988 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-04 22:12:59 +00:00
Howard Hinnant
1e564246ec
G M: Changes all references to "x inline" to "inline x" where x = _libcpp_always_inline or _libcpp_inline_visibility macros.
...
The patch touches these files:
locale
array
deque
new
string
utility
vector
__bit_reference
__split_buffer
locale_win32.h
There is no intended functionality change and it is expected that reversing the position of the inline keyword with regard to the other keywords does not change the meaning of anything, least not for apple/Linux etc.
It is intended to make libcxx more consistent with itself and to prevent the 1000 or so
"inline.cpp(3) : warning C4141: 'inline' : used more than once" warnings that MS's cl.exe compiler emits without this patch, i.e. if inline is not the first keyword before a function name etc.
Prefer "inline [other inline related keyword]" over "[other related keyword] inline".
After this patch, libcxx should be consistent to this pattern.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191987 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-04 22:09:00 +00:00
Howard Hinnant
f677bc4165
G M: Fix libcxx's detection of rtti disablement for g++.exe and cl.exe. When RTTI is NOT enabled, _LIBCPP_NO_RTTI is defined.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191981 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-04 21:24:21 +00:00
Howard Hinnant
f7555069ab
G M: Provides the _LIBCPP_WARNING macro, to be used for MSVC only, since that compiler doesn't support #warning.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191980 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-04 21:14:44 +00:00
Peter Collingbourne
66a8fcecd9
libc++abi no longer has a cxa_demangle.h header.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191935 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-03 22:58:36 +00:00
Peter Collingbourne
8df0320334
Re-add bad_cast and bad_typeid default ctor definitions under libsupc++.
...
libsupc++ declares these constructors inline, so we won't necessarily
get a definition for them in the library.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191931 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-03 22:04:10 +00:00
Peter Collingbourne
4c81b00f75
Make it possible to run the test suite when built as part of LLVM.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191930 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-03 21:58:25 +00:00
Alexey Samsonov
f7eb5738f6
Explicitly specify -Wno-error if LIBCXX_ENABLE_WERROR is false.
...
libcxx doesn't build with -Werror because of #warnings in its source
code. But when libcxx is built as an external LLVM project, it inherits
LLVM build flags, breaking the build if LLVM_ENABLE_WERROR is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191814 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02 07:44:19 +00:00
Marshall Clow
19e7862eb8
Remove non-printable chars that snuck in back in July; thanks to Yaron Keren for the catch
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191756 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-01 13:28:20 +00:00
Marshall Clow
bd444af850
Part 8 of LWG Issue 2210' unordered_set and unordered multiset; this got missed when I went on vacation
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191705 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-30 21:33:51 +00:00
Howard Hinnant
ff7546e974
SCARY/N2913 iterator support between the multi and non-multi versions of the associative and unordered containers. I beleive lack of support for this was accidentally recently introduced (by me) and this is fixing a regression. This time tests are put in to prevent such a regression in the future.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191692 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-30 19:08:22 +00:00
Alexey Samsonov
179fa78da3
[CMake] Put libcxx-specific module directories to the front of CMAKE_MODULE_PATH.
...
Otherwise if libcxx is built as an LLVM external project (after r191624),
"include(config-ix)" will include config-ix.cmake from LLVM, not from libcxx,
which will result in misconfigured build tree.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191657 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-30 09:10:01 +00:00
Marshall Clow
9738cafa4f
Implement n3789; constexpr support in named function objects
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191626 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-28 19:06:12 +00:00
Marshall Clow
6db12cb037
Add a set of macros for using the new '[[[deprecated]]' attribute. No code changes (yet)
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191625 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-28 18:35:31 +00:00
Marshall Clow
4af78bb10b
Fixed bad link for n3789; thanks to Chip Davis for the catch
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191598 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-28 01:52:18 +00:00
Marshall Clow
42389d214f
Updated my role
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191596 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-28 01:25:55 +00:00
Marshall Clow
cb55b18fa9
Missed a change that didn't have an issue number 'GB 9'
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191575 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-27 22:21:17 +00:00
Marshall Clow
91008752ed
Updated table with results from Chicago
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191573 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-27 22:16:32 +00:00
Chandler Carruth
d1754fb3e9
Make the guard for external ABI libraries include the guard for
...
libsupc++ in typeinfo.cpp, bringing it into agreement with
exception.cpp. This fixes link errors due to duplicate symbols from
this translation unit.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191397 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-25 20:01:44 +00:00
Howard Hinnant
fc910cb9a0
Peter Collingbourne: Fix warnings when compiling with -DNDEBUG.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191148 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-21 21:26:37 +00:00
Howard Hinnant
de589f2f8f
Peter Collingbourne: If a pointer is passed as the third argument of the (iterator,
...
iterator, allocator) constructor with the intention of it being
implicitly converted to the allocator type, it is possible for overload
resolution to favour the (iterator, iterator, enable_if) constructor.
Eliminate this possibility by moving the enable_if to one of the
existing arguments and removing the third argument.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191145 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-21 21:13:54 +00:00
Howard Hinnant
dcc6a0bc44
Apply LWG 2048. It is amazing to me that this actually works, but the existing tests confirm that it does. c++1y status page now showing libc++ is complete for c++1y modulo dynarray issues.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191142 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-21 19:25:37 +00:00
Howard Hinnant
0836f87fb9
Apply LWG 2021. This is only a documentation change. Also bringing c++1y status page up to date.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191141 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-21 18:17:23 +00:00
Howard Hinnant
23e470c348
Apply LWG 2017. This is a only a documentation change.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191140 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-21 17:58:58 +00:00
Howard Hinnant
ba898e4208
N3659: Shared locking in C++ Revision 2, c++1y only
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191127 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-21 01:49:28 +00:00
Howard Hinnant
8127758024
David Chisnall: macro protect 'test' in __has_pointer_type_imp.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191126 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-21 01:45:05 +00:00
Joerg Sonnenberger
bd64f140d4
Fix typo.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@190857 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-17 08:46:53 +00:00
Howard Hinnant
ef5aa93b9c
G M: Restore the ability for libcxx to compile again on mingw 64.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@190837 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-17 01:34:47 +00:00
Howard Hinnant
cd942f1840
Marshall Clow: LWG Issue 2056: future_errc enums start with value 0 (invalid value for broken_promise).
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@190756 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-14 18:20:10 +00:00
Marshall Clow
a49a2c9deb
LWG Issue 2210 (Part #7 ): vector and vector<bool>
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@190736 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-14 00:47:59 +00:00
Howard Hinnant
37c4acfe5e
G M: Make shared_ptr a little more gentle for some compilers. No impact on clang.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@190732 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-13 23:56:00 +00:00
Howard Hinnant
d885143d5c
G M: Make valarray a little more forgiving to compilers not quite so gifted. This has no impact on clang.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@190731 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-13 23:27:42 +00:00
Marshall Clow
6ecf7f2d54
Fix link to dynarray issue
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@190707 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-13 17:32:32 +00:00
Marshall Clow
94d3f6b518
Update status for <dynarray>
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@190700 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-13 15:37:11 +00:00
Marshall Clow
27a1c252e3
Initial implementation of <dynarray>. No allocator support pending resolution of LWG #2235 ; no stack allocation pending compiler support
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@190697 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-13 15:22:55 +00:00
Marshall Clow
f4107076e4
Test for 'bad_array_length'; got left out of initial commit
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@190614 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-12 17:01:38 +00:00
Marshall Clow
6dff618d7d
LWG Issue 2210 (Part #6 ): unordered_map and unordered_multimap
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@190576 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-12 03:00:31 +00:00
Marshall Clow
599e60d2f7
Implement uses-allocator construction
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@190571 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-12 02:11:16 +00:00
Howard Hinnant
f9d2680e19
A collection of minor type-o fixes. The first two aren't testable, but all tests pass with them. I stumbled across them while experimenting with a std::move that checks its argument for non-const. The third corrects a test that is currently failing.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@190563 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-12 00:10:44 +00:00
Marshall Clow
7f9f52e6c6
Adding bad_array_length to libc++
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@190478 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-11 01:38:42 +00:00
Marshall Clow
49d596d412
LWG Issue #2210 Part 5 - map/multimap; no, really - the last one was set/multiset. THIS is map/multimap
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@190474 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-11 01:15:47 +00:00
Marshall Clow
24a7e331f1
LWG Issue #2210 Part 4 - map/multimap
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@190454 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-11 00:06:45 +00:00
Marshall Clow
e00f53bcfb
Update synopsis for list/forward_list/deque to match the allocator style of existing comment. No code change
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@190320 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 18:19:45 +00:00
Marshall Clow
6398343bfc
Remove a tab that snuck in
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@190283 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-08 21:13:57 +00:00
Howard Hinnant
ac04e1f5bf
Fix minor type-o in tests.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@190280 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-08 19:28:51 +00:00
Marshall Clow
955f2c88a1
LWG Issue 2210 (Part #2 & #3 ): list and forward_list
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@190279 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-08 19:11:51 +00:00
Marshall Clow
ab04aadaf4
LWG Issue 2210 (Part #1 ): deque
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@190251 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-07 16:16:19 +00:00
Marshall Clow
62f34be0ba
N3545: Quoted strings
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@190032 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-05 04:48:45 +00:00
Marshall Clow
058655b28a
Mark issues 2103, 2005, 2196 and 2203 as complete. No code changes.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@190012 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-04 23:48:25 +00:00