summaryrefslogtreecommitdiffstats
path: root/libcxx
Commit message (Collapse)AuthorAgeFilesLines
...
* Update tests -verify error messages after r300140.Eric Fiselier2017-04-131-1/+1
| | | | llvm-svn: 300156
* Fix more bad member swap definitions in unordered_map.Eric Fiselier2017-04-131-2/+2
| | | | | | | | | | | The __unordered_map_equal and __unordered_map_hash wrappers attempt to swap const qualified predicates whenever the predicate is empty, and is subject to the EBO. Swapping const values seems blatently incorrect. This patch removes the const qualifier so the values are swapped as non-const. llvm-svn: 300154
* Fix the default constructibility of __compressed_pair.Eric Fiselier2017-04-131-2/+8
| | | | | | | This patch fixes a bug where the =default default ctor for __compressed_pair was incorrect for const qualified types. llvm-svn: 300152
* Fix most failures caused by r300140Eric Fiselier2017-04-134-8/+8
| | | | | | | | | | | | | | | | | | | | | r300140 introduced a bunch of failures by changing the internal interface provided by __compressed_pair. This patch fixes all of the failures caused by the new interface by changing the existing code to use it. In addition to those changes this patch also fixes two separate issues causing test failures: 1) Fix the member swap definition for __map_value_compare. Previously the swap was incorrectly configured to swap the comparator as const. 2) Fix an assertion failure in futures.task.members/ctor_func_alloc.pass.cpp that incorrectly expected a move to take place when a single copy is sufficient. There is one remaining failure regarding make_shared. I'll commit a fix for that shortly. llvm-svn: 300148
* [libcxx] Fix __compressed_pair so it doesn't copy the argument multiple ↵Eric Fiselier2017-04-124-313/+181
| | | | | | | | | | | | | | | | | | | | | times, and add constexpr. Summary: __compressed_pair takes and passes it's constructor arguments by value. This causes arguments to be moved 3 times instead of once. This patch addresses that issue and fixes `constexpr` on the constructors. I would rather have this fix than D27564, and I'm fairly confident it's not ABI breaking but I'm not 100% sure. I prefer this solution because it removes a lot of code and makes the implementation *much* smaller. Reviewers: mclow.lists, K-ballo Reviewed By: K-ballo Subscribers: K-ballo, cfe-commits Differential Revision: https://reviews.llvm.org/D27565 llvm-svn: 300140
* Fix test failures with older Clang versionsEric Fiselier2017-04-122-0/+4
| | | | llvm-svn: 300132
* [libc++] Implement LWG 2911 - add an is_aggregate type-traitEric Fiselier2017-04-125-2/+133
| | | | | | | | | | | | | | | | | Summary: This patch implements http://cplusplus.github.io/LWG/lwg-defects.html#2911. I'm putting this up for review until __is_aggregate is added to clang (See D31513) Reviewers: mclow.lists Reviewed By: mclow.lists Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D31515 llvm-svn: 300126
* Additional test file for r300123Marshall Clow2017-04-121-17/+47
| | | | llvm-svn: 300124
* Implement part of LWG#2857 - any/optional. Still to do - variant. Reviewed ↵Marshall Clow2017-04-123-26/+50
| | | | | | as https://reviews.llvm.org/D31956 llvm-svn: 300123
* Fix incorrectly qualified return type from unique_ptr::get_deleter().Eric Fiselier2017-04-124-31/+73
| | | | | | | | | | | For reference deleter types the const qualifier on the return type of get_deleter() should be ignored, and a non-const deleter should be returned. This patch fixes a bug where "const deleter_type&" is incorrectly formed. llvm-svn: 300121
* [libc++] Use more appropriate conditional for ABI macro definitionShoaib Meenai2017-04-121-10/+15
| | | | | | | | | | | | The inline function definition ABI macro is gated on COFF dllexport semantics, so it's more appropriate to mark it with the object file format macro rather than the generic _WIN32 macro. We now have no uses of _WIN32 apart from those used to define the other Windows macros :) Clarify the ABI macro comment and make the object file format check exhaustive while I'm here. llvm-svn: 300097
* [libcxx] [test] Avoid Clang's -Wunused-const-variable in ↵Stephan T. Lavavej2017-04-121-0/+1
| | | | | | | | | | is_constructible.pass.cpp. This happens when using Clang with MSVC's STL, so there are no actual uses of this variable. Fixes D31966. llvm-svn: 300079
* Add some FAIL constexpr tests for optional's copy/move ctors.Marshall Clow2017-04-122-0/+73
| | | | llvm-svn: 300009
* Implement LWG#2873: 'Add noexcept to several shared_ptr related functions' ↵Marshall Clow2017-04-117-41/+76
| | | | | | This issue missed a couple, so I added those as well (see LWG#2942) llvm-svn: 299963
* [libc++] Fix unknown pragma warning on MSVCBen Craig2017-04-111-1/+1
| | | | llvm-svn: 299942
* Mark P0599 as complete. It was implemented in r298573Marshall Clow2017-04-111-2/+2
| | | | llvm-svn: 299941
* Fix a C++03 failureMarshall Clow2017-04-111-3/+3
| | | | llvm-svn: 299909
* Remove some trigraphs that GCC was complaining aboutMarshall Clow2017-04-111-2/+2
| | | | llvm-svn: 299907
* Fix PR#32605: common_type<T> is not SFINAE-friendlyMarshall Clow2017-04-102-4/+6
| | | | llvm-svn: 299901
* Fix PR#32606: std::decay mishandles abominable function typesMarshall Clow2017-04-102-5/+22
| | | | llvm-svn: 299894
* Revert "Allow a standard library to implement conditional noexcept for ↵Akira Hatanaka2017-04-072-11/+4
| | | | | | | | optional and unique_ptr hash functions." This reverts commit r299734. llvm-svn: 299744
* [libc++] Drop support for CRTs older than VS 2015Shoaib Meenai2017-04-077-78/+27
| | | | | | | | | | | LLVM dropped support for Visual Studio versions older than 2015 quite some time ago, so I consider it safe to drop libc++'s support for older CRTs. The CRT in Visual Studio 2015 provides a lot of previously missing functions, so targeting it requires less special casing. Differential Revision: https://reviews.llvm.org/D31798 llvm-svn: 299743
* Add noexcept(false) to more strongly indicate that not being noexcept is ↵Billy Robert O'Neal III2017-04-062-2/+2
| | | | | | important for hash tests. llvm-svn: 299735
* Allow a standard library to implement conditional noexcept for optional and ↵Billy Robert O'Neal III2017-04-062-4/+11
| | | | | | | | | | unique_ptr hash functions. These tests were unconditionally asserting that optional and unique_ptr declare throwing hashes, but MSVC++ implements conditional noexcept forwarding that of the underlying hash function. As a result we were failing these tests but there's nothing forbidding strengthening noexcept in that way. Changed the ASSERT_NOT_NOEXCEPT asserts to use types which themselves have non-noexcept hash functions. llvm-svn: 299734
* [CMake][libcxx] Use check_c_compiler_flag to check for nodefaultlibsPetr Hosek2017-04-061-1/+2
| | | | | | | | | We're using -nodefaultlibs to avoid the dependency on C++ library when using check_cxx_compiler_flag, and as such we cannot use check_cxx_compiler_flag to check the availability of -nodefaultlibs itself. llvm-svn: 299711
* Some of Eric's buildbots don't like this test. Disable it while I figure out ↵Marshall Clow2017-04-061-0/+2
| | | | | | why. llvm-svn: 299686
* Recommit awk tests with warnings removed. Initial commit r299652, reverted ↵Marshall Clow2017-04-061-48/+47
| | | | | | r299656. llvm-svn: 299680
* Revert "Restore Missing awk regex tests. Thanks to dexonsmith for noticing, ↵Mehdi Amini2017-04-061-8/+9
| | | | | | | | and proposing this as https://reviews.llvm.org/D16541" This reverts commit r299652, 32bits MacOS is broken. llvm-svn: 299656
* Restore Missing awk regex tests. Thanks to dexonsmith for noticing, and ↵Marshall Clow2017-04-061-9/+8
| | | | | | proposing this as https://reviews.llvm.org/D16541 llvm-svn: 299652
* [libc++] Respect Windows Store app CRT restrictionsShoaib Meenai2017-04-062-0/+12
| | | | | | | | | | | | | Some CRT APIs are unavailable for Windows Store apps [1]. Detect when we're targeting the Windows Store and don't try to refer to non-existent CRT functions in that case. (This would otherwise lead to a compile error when using the libc++ headers and compiling for Windows Store.) [1] https://docs.microsoft.com/en-us/cpp/cppcx/crt-functions-not-supported-in-universal-windows-platform-apps Differential Revision: https://reviews.llvm.org/D31737 llvm-svn: 299625
* Fix remote test execution in litMehdi Amini2017-04-061-2/+3
| | | | | | | | | | Can be used as such: $ python /path/to/lit.py -sv /path/to/llvm/build/projects/libcxx/test/ \ --param=use_system_cxx_lib=true \ --param=executor='SSHExecutor("remote.domain", "username")' llvm-svn: 299607
* Use alternate string layout for ARMv7kMehdi Amini2017-04-061-1/+1
| | | | llvm-svn: 299606
* [CMake][libcxx] Use builtins rather than gcc_s when compiler-rt is requestedPetr Hosek2017-04-053-3/+13
| | | | | | | | | When compiler-rt is requested, we should attempt to link compiler-rt builtins library rather than gcc_s. Differential Revision: https://reviews.llvm.org/D31617 llvm-svn: 299599
* Fix more -Wshadow warnings introduced by recent Clang changeEric Fiselier2017-04-046-7/+0
| | | | llvm-svn: 299411
* Work around recent -Wshadow changes in ClangEric Fiselier2017-04-042-1/+11
| | | | llvm-svn: 299407
* Fix C++17 dylib buildEric Fiselier2017-04-031-1/+2
| | | | llvm-svn: 299401
* suppress GCC warning about noexcept functions changing manglingEric Fiselier2017-04-032-1/+3
| | | | llvm-svn: 299385
* [libc++] Explicitly mark specializations as dllexportShoaib Meenai2017-04-031-4/+4
| | | | | | | | | Method specializations don't get exported even if there's an exported extern template instantiation on Windows. Explicitly mark the methods for export. They're already exported on Linux and Darwin, so there's no ABI change on those platforms. llvm-svn: 299348
* string: Remove always_inline from basic_string::__initDuncan P. N. Exon Smith2017-04-011-5/+5
| | | | | | | | | | | | | | | This is effectively a partial revert of r278356, which started inlining basic_string::__init. Even if we want to help the compiler along with an inlinehint, we shouldn't hamstring it by forcing it to inline all the time. Libc++ uses always_inline widely as a limit-the-ABI-hack, but since __init is already on the dylib boundary, it makes no sense here and just harms the debugging experience at -O0. rdar://problem/31013102 llvm-svn: 299290
* Use strong enums independently of -fobjc-arcDuncan P. N. Exon Smith2017-03-311-1/+0
| | | | | | | | | | | | | | | | | r145698 introduced _LIBCPP_HAS_NO_STRONG_ENUMS by copy-pasting the __has_feature check from objc_arc_weak/_LIBCPP_HAS_OBJC_ARC_WEAK, and accidentally started defining _LIBCPP_HAS_NO_STRONG_ENUMS whenever __has_feature(objc_arc_weak). This is totally bogus, and means that Libc++ thinks Objective-C++ compilations with -fobjc-arc don't have strong enums. Delete the accidental line. I thought about adding a test, but it would be entirely duplicative of the patch (if has-feature strong enums, check that has-no-strong-enums is not defined). llvm-svn: 299236
* Try to fix the libcxx build with mingw64Reid Kleckner2017-03-311-0/+5
| | | | | | | | | | | | | | | | Summary: mingw64 has lots of default libs that libc++ and its test programs should link against. With this patch, cmake now runs successfully with GCC on Windows. Reviewers: mati865, EricWF Subscribers: mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D31518 llvm-svn: 299144
* Fix LWG 2934 - optional<const T> doesn't compare with TEric Fiselier2017-03-3014-455/+589
| | | | llvm-svn: 299105
* Implement LWG 2842 - optional(U&&) needs to SFINAE on decay_t<in_place_t>Eric Fiselier2017-03-303-2/+16
| | | | llvm-svn: 299100
* libc++ testing: fix invalid python syntaxMehdi Amini2017-03-301-1/+1
| | | | llvm-svn: 299057
* libc++ testing: fix assertion around `use_system_cxx_lib`Mehdi Amini2017-03-301-2/+2
| | | | | | | Actually fix (hopefully) the assertions about `use_system_cxx_lib`, the previous attempt failed because I misread the error. llvm-svn: 299056
* libc++ config testing: `use_system_cxx_lib` can be a boolMehdi Amini2017-03-301-1/+1
| | | | | | Fix the libc++ Green Dragon bot. llvm-svn: 299055
* Reexport operator new / delete from libc++abiMehdi Amini2017-03-301-8/+8
| | | | | | | | | | | | | Both libc++ and libc++abi export a weak definition of operator new/delete. On Darwin, this can often cause dirty __DATA in the shared cache when having to switch from one to the other. Instead, libc++ should reexport libc++abi's implementation of these symbols. Patch by: Ted Kremenek <kremenek@apple.com> Differential Revision: https://reviews.llvm.org/D30765 llvm-svn: 299054
* libc++ testing: allow to provide a path for `use_system_cxx_lib`Mehdi Amini2017-03-302-5/+18
| | | | | | | | | | As we're trying to setup testing / bots for all shipping version of libc++ on macOS/iOS, we'll need to be able to pass a path to where to find the dylib for each previous version of the OS. Differential Revision: https://reviews.llvm.org/D31486 llvm-svn: 299053
* Do not pass an explicit reexported symbol list when building libc++ dylib if ↵Mehdi Amini2017-03-301-1/+5
| | | | | | also defining new/delete llvm-svn: 299052
* [libc++] Add a key function for bad_function_callShoaib Meenai2017-03-284-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: bad_function_call is currently an empty class, so any object files using that class will end up with their own copy of its typeinfo, typeinfo name and vtable, leading to unnecessary duplication that has to be resolved by the dynamic linker. Instead, give bad_function_call a key function and put a definition for that key function in libc++ itself, to centralize the typeinfo and vtable. This is consistent with the behavior for other exception classes. The key functions are defined in libc++ rather than libc++abi since the class is defined in the libc++ versioning namespace, so ABI compatibility with libstdc++ is not a concern. Guard this change behind an ABI macro, since it isn't backwards compatible (i.e., clients built against the new libc++ headers wouldn't be able to run against an older libc++ library). Reviewers: mclow.lists, EricWF Subscribers: mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D27387 llvm-svn: 298937
OpenPOWER on IntegriCloud