Commit Graph

3143 Commits

Author SHA1 Message Date
Eric Fiselier
06e44a7ea8 Correct ABI changelog revision number
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284207 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-14 06:47:37 +00:00
Eric Fiselier
9acbffa370 Implement P0035R4 -- Add C++17 aligned allocation functions
Summary:
This patch implements the library side of P0035R4. The implementation is thanks to @rsmith.

In addition to the C++17 implementation, the library implementation can be explicitly turned on using `-faligned-allocation` in all dialects.


Reviewers: mclow.lists, rsmith

Subscribers: rsmith, cfe-commits

Differential Revision: https://reviews.llvm.org/D25591

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284206 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-14 06:46:30 +00:00
Eric Fiselier
4289b6ea05 Cleanup LIT testing doc
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284205 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-14 06:15:27 +00:00
Eric Fiselier
9dbc053b47 Remove two ABI symbols added after the 3.9 release
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284200 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-14 05:29:46 +00:00
Eric Fiselier
8efec5eeb6 Add ABI changelog entry for <any>
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284199 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-14 05:10:06 +00:00
Eric Fiselier
852b521720 Sort ABI lists by name so that changes don't generate big diffs
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284198 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-14 05:04:00 +00:00
Eric Fiselier
7fa27fcbaf Revert r284193 - it is not correct on OS X
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284194 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-14 04:21:24 +00:00
Eric Fiselier
c3d49c930b Re-export two previously exported std::string functions.
These functions were removed from the dylib sometime between the 3.9 release
and now. This patch manually exports them to re-gain ABI compatibility.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284193 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-14 04:14:24 +00:00
Eric Fiselier
977cd9f231 Add ABI list for 3.9 linux
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284192 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-14 04:06:19 +00:00
Eric Fiselier
959ed21455 Add 3.9 symbol list for OS X
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284189 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-14 02:55:43 +00:00
Eric Fiselier
7d1452eb46 Fix CMake configuration error and add ABI lists for OS X.
The primary reason for this patch is to add the OS X ABI lists for 3.9 and
ToT.

However while working on that I discovered that we incorrectly
exported the libc++abi symbols. Previously we had chosen the wrong CMake
configuration path and that caused us to re-export the c++abi binary instead
of using the symbol lists.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284188 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-14 02:55:19 +00:00
Eric Fiselier
d6a66c6361 Add OS X abi list
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284186 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-14 02:32:54 +00:00
Eric Fiselier
b17cc02df2 Add ABI Changelog and current symbol list for Linux
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284185 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-14 02:27:44 +00:00
Sebastian Pop
3d12b5c6f3 remove warnings from google-benchmarks in libcxx
Differential Revision: https://reviews.llvm.org/D25522

Patch written by Aditya Kumar.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284179 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-14 00:07:57 +00:00
Marshall Clow
426eb5dd44 Update the status of three papers that do not require library changes
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284165 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 21:15:09 +00:00
Marshall Clow
e29fb4c411 Implement http://wg21.link/p0302r1: Removing Allocator Support in std::function. These functions never worked, and as far as I know, no one ever called them.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284164 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 21:06:03 +00:00
Marshall Clow
698cce6e0e Add missing include in test; NFC. Thanks to Jonathan Wakely for the report.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284120 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 13:21:38 +00:00
Eric Fiselier
a469f83b26 Revert r282345 - Use __attribute__((internal_linkage)) when available.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284101 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 04:07:58 +00:00
Dimitry Andric
ecb5332d41 Disable trivial pair copy/move tests when unsupported
Summary:
On FreeBSD, for ABI compatibility reasons, the pair trivial copy
constructor is disabled, using the aptly-named
`_LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR` define.

Disable the related tests when this define is on, so they don't fail
unexpectedly.

Reviewers: emaste, rsmith, theraven, EricWF

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D25449

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284047 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 20:26:47 +00:00
Marshall Clow
b6361287ff Mark ostream_iterator's constructors as noexcept.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284021 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 16:13:48 +00:00
Shoaib Meenai
d588d2dc20 [libc++] Correct explanation of _LIBCPP_NEW_DELETE_VIS
The behavior of this macro actually needs to apply universally on
Windows and not just when using the Microsoft CRT. Update the macro
definition and documentation accordingly.

Differential Revision: https://reviews.llvm.org/D25145

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284016 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 13:48:14 +00:00
Eric Fiselier
c69d8ca589 Correctly grant rebound limited_allocators friendship.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284006 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 11:35:37 +00:00
Eric Fiselier
9bc0638a92 Remove incorrect XFAILS
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284005 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 11:29:18 +00:00
Eric Fiselier
de8e3d3a4f Unbreak C++03 build
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284004 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 11:20:27 +00:00
Eric Fiselier
a7b77ebd18 Remove usages of _LIBCPP_CONSTEXPR under test/std
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284002 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 10:28:09 +00:00
Eric Fiselier
4775578c61 Remove usages of _ALIGNAS_TYPE
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@283999 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 10:19:48 +00:00
Eric Fiselier
76f406d252 support --param=std=gnu++XX
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@283997 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 09:53:35 +00:00
Eric Fiselier
6f6a9607c2 Fix more C++11 constexpr issues in the tests
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@283996 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 09:48:44 +00:00
Eric Fiselier
159b45f505 Fix nasty_containers.hpp for other stdlibs
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@283994 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 09:31:26 +00:00
Eric Fiselier
bf148f02bc Fix use of C++14 constexpr in C++11
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@283993 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 09:20:58 +00:00
Eric Fiselier
ae96260ceb Remove use of _VSTD::__invoke in the not_fn tests
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@283991 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 09:06:12 +00:00
Eric Fiselier
028a2091ea Protect special members of NullBase archetype to avoid exposing them
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@283983 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 08:09:22 +00:00
Eric Fiselier
35ce4859dd Implement N4606 optional
Summary:
Adapt implementation of Library Fundamentals TS optional into an implementation of N4606 optional.

  - Update relational operators per http://wg21.link/P0307
  - Update to requirements of http://wg21.link/P0032
  - Extension: Implement trivial copy/move construction/assignment for `optional<T>` when `T` is trivially copyable.

Audit P/Rs for optional LWG issues:
  - 2756 "C++ WP optional<T> should 'forward' T's implicit conversions" Implemented, which also resolves 2753 "Optional's constructors and assignments need constraints" (modulo my refusal to explicitly delete the move operations, which is a design error that I'm working on correcting in the 2756 P/R).
  - 2736 "nullopt_t insufficiently constrained" Already conforming. I've added a test ensuring that `nullopt_t` is not copy-initializable from an empty braced-init-list, which I believe is the root intent of the issue, to avoid regression.
  - 2740 "constexpr optional<T>::operator->" Already conforming.
  - 2746 "Inconsistency between requirements for emplace between optional and variant" No P/R, but note that the author's '"suggested resolution" is already implemented.
  - 2748 "swappable traits for optionals" Already conforming.
  - 2753 "Optional's constructors and assignments need constraints" Implemented.

Most of the work for this patch was done by Casey Carter @ Microsoft. Thank you Casey!



Reviewers: mclow.lists, CaseyCarter, EricWF

Differential Revision: https://reviews.llvm.org/D22741

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@283980 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 07:46:20 +00:00
Eric Fiselier
ead5d404cc Revert Add <optional>. Will recommit with better commit message
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@283978 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 06:48:31 +00:00
Eric Fiselier
fbc80168bb Add <optional> header.
This patch is largely thanks to Casey Carter @ Microsoft. He did the initial
work of porting our experimental implementation and tests over to namespace
std.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@283977 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 06:45:11 +00:00
Eric Fiselier
159b460868 Fix two more tests that hang when testing against libstdc++
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@283976 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 04:56:23 +00:00
Eric Fiselier
4432d3f204 Prevent the test suite from hanging when run against libstdc++
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@283975 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 04:29:50 +00:00
Eric Fiselier
fc6e622f19 Add mork workarounds for running the test suite against libstdc++
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@283960 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 00:28:14 +00:00
Eric Fiselier
53003593a2 Make it easier to run the libc++ test suite against libstdc++
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@283958 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 00:00:37 +00:00
Eric Fiselier
508f208ae9 Fix LWG2683 - filesystem::copy() should always clear the user-provided error_code
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@283951 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-11 22:18:09 +00:00
Marshall Clow
a75b75f514 Remove extraneous 'const' in the implementation of is_move_assignable. Howard pleads temporary insanity about this. Discussed at http://stackoverflow.com/questions/39986185
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@283945 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-11 21:24:06 +00:00
Eric Fiselier
e2bd16c9d2 Fix std::pair on FreeBSD
Summary:
FreeBSD ships an old ABI for std::pair which requires that it have non-trivial copy/move constructors. Currently the non-trivial copy/move is achieved by providing explicit definitions of the constructors. This is problematic because it means the constructors don't SFINAE properly. In order to SFINAE copy/move constructors they have to be explicitly defaulted and hense non-trivial.

This patch attempts to provide SFINAE'ing copy/move constructors for std::pair while still making them non-trivial. It does this by adding a base class with a non-trivial copy constructor and then allowing pair's constructors to be generated by the compiler. This also allows the constructors to be constexpr.


Reviewers: emaste, theraven, rsmith, dim

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D25389

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@283944 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-11 21:22:21 +00:00
Eric Fiselier
05577c82e1 Fix incorrect exception handling behavior in the uninitialized algorithms
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@283941 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-11 21:13:44 +00:00
Marshall Clow
9d97e2bc3f Mark 2777 as complete
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@283804 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 21:37:16 +00:00
Marshall Clow
529c61f2dc Update with the rest of the results from the 7-Oct Telecom
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@283799 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 21:00:12 +00:00
Petr Hosek
bf1f79c27a [libcxx] Add support for Fuchsia
Fuchsia is a new operating system which uses musl as the standard
C library, libc++ and libc++abi as the C++ standard library.

Differential Revision: https://reviews.llvm.org/D25414

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@283788 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 18:53:32 +00:00
Marshall Clow
bcef974041 Updated notes about issues; marked 2062, 2223, 2394, 2460 and 2540 as complete.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@283781 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 17:11:37 +00:00
Marshall Clow
e9115a1b41 Add tests to check that swap(std::function, std::function) is noexcept. This is LWG#2062, but we already do this. No changes to the library, just adding tests.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@283780 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 16:47:48 +00:00
Asiri Rathnayake
f7b867b342 [libcxx] Fix gcc build.
Attempt to fix a horrible gcc include order problem.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@283762 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 15:56:01 +00:00
Eric Fiselier
742d878b02 Fix documentation mis-spelling.
I promise to stop misspelling things when the English language gains a program
that does strict semantic checking.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@283759 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 14:45:06 +00:00