2304 Commits

Author SHA1 Message Date
Marshall Clow
e9ef988b08 Implement LWG#2353: std::next is over-constrained
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@252407 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-07 17:48:49 +00:00
Marshall Clow
6455d85714 More of P0006R0: type traits variable aliases for C++17.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@252406 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-07 17:44:36 +00:00
Evgeniy Stepanov
a3b25f81d1 Cleanup: move visibility/linkage attributes to the first declaration.
This change moves visibility attributes from out-of-class method
definitions to in-class declaration. This is needed for a switch to
attribute((internal_linkage)) (see http://reviews.llvm.org/D13925)
which can only appear on the first declaration.

This change does not touch istream/ostream/streambuf. They are
handled separately in http://reviews.llvm.org/D14409.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@252385 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-07 01:22:13 +00:00
Evgeniy Stepanov
746572b91d Allow deque to handle incomplete types.
Allow deque and deque::iterator instantiation with incomplete element
type. This is an ABI breaking change, and it is only enabled if
LIBCXX_ABI_VERSION >= 2 or LIBCXX_ABI_UNSTABLE=ON.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@252350 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-06 22:02:29 +00:00
Eric Fiselier
38e7a30143 Cleanup foo.h headers and __config to work in C
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@252274 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-06 06:30:12 +00:00
Marshall Clow
970a9e5866 Mark LWG issue #2234. We already do this; no code change needed
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@252199 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-05 19:57:50 +00:00
Marshall Clow
223df2ef0f Implement P0092R1 for C++1z
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@252195 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-05 19:33:59 +00:00
Marshall Clow
c010bd6289 Make reverse() call iter_swap like the standard says, instead of calling swap directly. No real change.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251836 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-02 21:34:25 +00:00
Marshall Clow
25bcb0a5a9 Remove undefined behavior from some tests. Same pattern as the unitialized_copy tests
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251804 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-02 15:29:13 +00:00
Marshall Clow
48bcd27b67 Remove undefined behavior from some tests. Thanks to Walter Brown for the heads-up.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251802 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-02 15:25:53 +00:00
Marshall Clow
59b5ea57c3 Add 'nostdinc++' to the flags used by testit. Makes the tests run better on Mac OS X with the new depr.c headers change
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251768 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-01 21:14:22 +00:00
Marshall Clow
fe11cfdd65 Improve the tests for 'is_literal_type'
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251767 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-01 21:13:10 +00:00
Marshall Clow
94611a888b Implement the first part of P0006R0: Adopt Type Traits Variable Templates for C++17. Significantly augment the existing tests.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251766 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-01 20:24:59 +00:00
Richard Smith
9d6ca4962b Revert r249929 ("Split <string.h> out of <cstring>").
This change caused problems when building code like povray that:
a) uses 'using namespace std;'
b) is built on an environment where the C library provides the "wrong"
   (non-const-correct) interface for the str* functions
c) makes an unqualified call to one of those str* functions

A patch is out for review to add a facility to fix this (and to give the
correct signatures for these functions whenever possible, even when the C
library does not do so). This revert is expected to be temporary.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251665 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-29 23:32:29 +00:00
Marshall Clow
8aadda9a19 Implement P0004R1 'Remove Deprecated iostreams aliases'
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251618 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-29 05:43:30 +00:00
Marshall Clow
0cff2318f5 Mark two Kona papers as 'in progress'
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251545 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-28 19:21:40 +00:00
Matthias Braun
1f98e313a1 Adapt to lit change in llvm r251478-r251481
Sorry for the breakage.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251529 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-28 17:20:33 +00:00
Eric Fiselier
dd2fe4de1d Fix test suite configuration. Sorry Marshall
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251334 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-26 19:08:53 +00:00
Marshall Clow
28ce1c847a Mark LWG#2495 as complete. No code changes needed
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251258 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 20:12:58 +00:00
Marshall Clow
fb7b97cfbb Fix LWG#2489: mem_fn() should be noexcept
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251257 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 20:12:16 +00:00
Marshall Clow
8997b87133 Add the tests for the last commit
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251254 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 19:53:29 +00:00
Marshall Clow
9533a4a80f Fix LWG#2476: scoped_allocator_adaptor is not assignable
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251253 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 19:52:47 +00:00
Marshall Clow
88fa03a06e Add a test for LWG#2466: allocator_traits::max_size() default behavior is incorrect
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251252 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 19:34:04 +00:00
Marshall Clow
175cb20bfb Add a test for LWG#2462: std::ios_base::failure is overspecified
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251250 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 19:20:14 +00:00
Marshall Clow
332ab91947 Fix LWG#2127: Move-construction with raw_storage_iterator.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251247 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 18:58:07 +00:00
Marshall Clow
dbef2bb1d0 Fix LWG#2244: basic_istream::seekg
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251246 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 18:31:51 +00:00
Marshall Clow
fd33deb083 Update C++ status from Kona
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251220 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 06:02:23 +00:00
Tim Northover
25037cf729 Set LC_COLLATE rather than LANG to override collation.
On a system with LC_COLLATE=C, this takes precedence over a non-C LANG
the test tries to impose and the test fails.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251131 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-23 17:56:08 +00:00
Eric Fiselier
e6d05b65b2 Use proper output directory when naminging the libc++ output
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251100 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-23 07:04:24 +00:00
Eric Fiselier
601d2c1165 Dont required CMake 3 to install a linker script
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251065 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-22 21:24:01 +00:00
Eric Fiselier
1cf5a81b89 Only disable linker script when LIBCXX_CXX_ABI_LIBNAME is none
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251063 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-22 20:54:27 +00:00
Eric Fiselier
5d5b59b826 Disable linker scripts when the ABI library is not specified or is none.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251062 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-22 20:50:07 +00:00
Marshall Clow
ac042ab93d Detect relaxed constexpr rules for gcc versions
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@250802 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-20 07:37:11 +00:00
Benjamin Kramer
8f6e763c49 Fix an unfortunate yet old typo that never got attention before r250507.
Should fix the xcode libc++ build.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@250508 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-16 11:26:26 +00:00
Benjamin Kramer
99290c6ec8 Remove a long-standing __has_include hack.
This was put in to get libc++ building without libcxxabi. We now have
macros that show that we are building against libcxxabi so use that
instead. This guards against existing but broken cxxabi.h headers on the
system.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@250507 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-16 11:14:30 +00:00
Eric Fiselier
1d3716a633 Re-enable linker scripts after fixing bad CMake
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@250472 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-15 23:04:54 +00:00
Eric Fiselier
a7780301d8 Quickly fix bad commit
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@250471 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-15 22:51:50 +00:00
Eric Fiselier
bb856cc357 [libcxx] Make libc++.so a linker script by default on most platforms.
Summary:
This patch turns on `LIBCXX_ENABLE_ABI_LINKER_SCRIPT` by default whenever `LLVM_HAVE_LINK_VERSION_SCRIPT` is ON. This turns out to be whenever:

1. WIN32 is not defined.
2 UNIX is defined.
3. APPLE is not defined.

While `LLVM_HAVE_LINK_VERSION_SCRIPT` is meant to reflect exactly what we are asking I think it's close enough.

After committing this patch Linux users will no longer have to use "-lc++abi" explicitly!




Reviewers: mclow.lists, danalbert, compnerd, jroelofs

Subscribers: emaste, rengolin, cbergstrom, cfe-commits

Differential Revision: http://reviews.llvm.org/D13739

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@250469 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-15 22:41:51 +00:00
Eric Fiselier
7b081f6bc5 Fix handling of -Wno-pedantic
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@250452 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-15 20:27:15 +00:00
Eric Fiselier
b9aebae3dc Add links to libc++ code coverage and builders
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@250361 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-15 03:27:02 +00:00
Eric Fiselier
89c7ec3512 Update issues status
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@250336 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-14 22:26:40 +00:00
Eric Fiselier
a317a1b7cf Use correct CMake variable for the libname
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@250329 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-14 21:20:28 +00:00
Eric Fiselier
d1e2a83a5e Link to new documentation from existing homepage
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@250325 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-14 20:51:33 +00:00
Eric Fiselier
2bc8f6ceeb Update testing guide for libc++
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@250323 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-14 20:44:44 +00:00
Eric Fiselier
8cbf020fdc [libcxx] Make it drastically simpler to link libc++.
Summary:
Currently on most platforms you have to manually link the c++ abi library used with libc++ whenever you use libc++. So your typical libc++ command like invocation might look like:

```
clang++ -stdlib=libc++ foo.cpp -lc++abi
```

Having to manually link `libc++abi.so` makes it harder for libc++ to be used generically. This patch fixes that by generating a linker script for `libc++.so` that correctly links the ABI library. On linux the linker script for libc++abi would look like:

```
# libc++.so
INPUT(libc++.so.1 -lc++abi)
```

With the linker script you can now use libc++ using only `-stdlib=libc++`. This is the technique that is used on FreeBSD in ordered to link cxxrt and I think it's the best approach to make our users lives simpler.

The CMake option used to enable this is `LIBCXX_ENABLE_ABI_LINKER_SCRIPT`. In future I would like to enable this by default on all platforms except for Darwin.

Reviewers: mclow.lists, danalbert, rsmith, jroelofs, EricWF

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D12508

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@250319 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-14 19:54:03 +00:00
Eric Fiselier
56c1f9b8e5 Split out config_site logic so libc++abi can use it
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@250312 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-14 19:00:35 +00:00
Eric Fiselier
f0cd203bdc [libcxx] Use __config_site to configure the test suite features.
Summary:
This patch changes the tests to use the "__config_site" header if present instead of manually configuring for each option. This patch also removes the test flags for configuring some of these options. For example "lit -sv --param=enable_threads=OFF" no longer works. However lit will still correctly configure if  the CMake option "-DLIBCXX_ENABLE_THREADS=OFF" is given at build time. 

This patch will fix the libc++abi test configuration for `LIBCXX_ABI_VERSION` and `LIBCXX_ABI_UNSTABLE` one we teach it about 'project_obj_dir' . I would like to land this ASAP to prevent more work blockage.

Reviewers: mclow.lists, danalbert, eugenis, ed, jroelofs

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D13714

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@250308 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-14 18:22:15 +00:00
Eric Fiselier
a4ae16b67a Fix GCC atomic implementation in C++03
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@250279 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-14 08:36:22 +00:00
Eric Fiselier
a6622799b4 Use __config_site when building libc++. Also cleanup ABI versioning doc
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@250261 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-14 00:22:05 +00:00
Eric Fiselier
499d87881a Workaround -pedantic flag added by LLVM
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@250256 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-13 23:56:33 +00:00