summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2016-12-08Fix PR27374 - Remove the implicit reduced-arity-extension in tuple.Eric Fiselier
This patch removes libc++'s tuple extension which allowed it to be constructed from fewer initializers than elements; with the remaining elements being default constructed. However the implicit version of this extension breaks conforming code. For example: int fun(std::string); int fun(std::tuple<std::string, int>); int x = fun("hello"); // ambigious Because existing code may already depend on this extension it can be re-enabled by defining _LIBCPP_ENABLE_TUPLE_IMPLICIT_REDUCED_ARITY_EXTENSION. Note that the explicit version of this extension is still supported, although it's somewhat less useful than the implicit one. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@289158 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-08Fix PR30323: numeric_limits<T>::max_digits10 when using 16 bit ints.Eric Fiselier
Summary: Also see https://llvm.org/bugs/show_bug.cgi?id=30323 Reviewers: mclow.lists Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D27566 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@289029 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-08Fix _LIBCPP_VERSION tests with modules on DarwinEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@289028 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-06Revert r288787: Add missing stdbool.h module.Eric Fiselier
Reverting because I didn't properly test this patch. Although it's probably correct to add a stdbool_h module I thought the change fixed more than it did. I'll re-commit after more investigation. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@288789 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-06Add missing stdbool.h module. The test suite now passes on OS X with modulesEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@288787 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-06Fix stdio module build on OS XEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@288778 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-06Fix C++03 modules buildEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@288755 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-05Add module definitions for <experimental/foo> headersEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@288735 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-05Add module definitions for string_viewEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@288733 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-05Add modules for any/optional/variantEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@288730 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-05Adjust libc++ test infastructure to fully support modulesEric Fiselier
This patch overhalls the libc++ test format/configuration in order to fully support modules. By "fully support" I mean get almost all of the tests passing. The main hurdle for doing this is handling tests that `#define _LIBCPP_FOO` macros to test a different configuration. This patch deals with these tests in the following ways: 1. For tests that define single `_LIBCPP_ABI_FOO` macros have been annotated with `// MODULES_DEFINES: _LIBCPP_ABI_FOO`. This allows the test suite to define the macro on the command line so it uses a different set of modules. 2. Tests for libc++'s debug mode (which define custom `_LIBCPP_ASSERT`) are automatically detected by the test suite and are compiled and run with modules disabled. This patch also cleans up how the `CXXCompiler` helper class handles enabling/disabling language features. NOTE: This patch uses `LIT` features which were only committed to LLVM today. If this patch breaks running the libc++ tests you probably need to update LLVM. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@288728 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-05[libc++] Add _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONSShoaib Meenai
It's useful to be able to disable visibility annotations entirely; for example, if we're building libc++ static to include in another library, and we don't want any libc++ functions getting exported out of that library. This is a generalization of _LIBCPP_DISABLE_DLL_IMPORT_EXPORT. Differential Revision: https://reviews.llvm.org/D26934 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@288690 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-04Choose better hash values for std::monostate and valueless variants.Eric Fiselier
Previously these hashes were 0 and -1 respectively. These seem like common sentinel values and should be avoided to prevent needless collisions. This patch changes those values to different arbitrary numbers, which should hopefully cause less collisions. Because I couldn't help myself I choose the fundamental constants for gravity and the speed of light. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@288623 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-03Make make_exception_ptr abort with -fno-exceptionsEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@288575 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-03Fix <variant> w/o exception supportEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@288571 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-03Fix -Wshadow warnings and enable warnings by default for C++ >= 11Eric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@288564 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-02Fix C++03 buildEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@288555 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-02Make variant's index part of the hash valueEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@288554 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-02Fix generated warnings in <variant>Eric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@288552 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-02Implement C++17 <variant>. Patch from Michael Park!Eric Fiselier
This patch was reviewed as https://reviews.llvm.org/D23263. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@288547 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29[libcxx] remove unused codeAditya Kumar
The macro _LIBCPP_UNROLL_LOOPS isn't used anywhere so the code was dead. Differential Revision: https://reviews.llvm.org/D26991 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@288143 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-26Implement conjuntion/disjuntion/negation for LFTS v2. Same code and tests ↵Marshall Clow
for the ones in std:: git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@287988 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-26Implement the 'detection idiom' from LFTS v2Marshall Clow
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@287981 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23Fix __hash_table::max_size() on 32 bit systemsEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@287749 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23[libcxx] Fix max_size() across all containersEric Fiselier
Summary: The `max_size()` method of containers should respect both the allocator's reported `max_size` and the range of the `difference_type`. This patch makes all containers choose the smallest of those two values. Reviewers: mclow.lists, EricWF Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26885 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@287729 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-22Allow libc++ to use modules in C++03.Eric Fiselier
Libc++ internal uses <atomic> in C++03 code but the module map forbids its use. This causes the libc++ 'std' module to fail to build in C++03. This patch removes the requirement to fix this issue. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@287693 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-22Attempt to fix stdint/cstdint modules try 2Eric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@287690 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-22Cleanup module.modulemapEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@287687 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-21Revert r287435 because of OS X test failuresEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@287531 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-19Fix stdint/cstdint modulesEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@287435 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-19[libcxx] Implement locale.h to fix modules buildEric Fiselier
Summary: Because `locale.h` isn't part of the libc++ modules the class definitions it provides are exported as part of `__locale` (since it happens to be build first). This breaks `<clocale>` which exports `std::lconv` without including `<__locale>`. This patch implements `locale.h` to fix this issue, it also adds support for testing libc++ with modules. Reviewers: mclow.lists, rsmith, EricWF Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26826 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@287413 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18Remove _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONSEric Fiselier
libc++ no longer supports C++11 compilers that don't implement `= default`. This patch removes all instances of the feature test macro _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS as well as the potentially dead code it hides. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@287321 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18[libc++] Fix preprocessor guard for overload declarationShoaib Meenai
Fix a typo in the conditional. Caught by going through list of removed symbols when building with hidden visibility. Differential Revision: https://reviews.llvm.org/D26825 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@287309 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-17Workaround compilers w/o C++1z inline variablesEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@287255 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-17Implement P0504R0: Revisiting in-place tag types for any/optional/variantEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@287250 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-16[libc++] Introduce `_LIBCPP_OVERRIDABLE_FUNC_VIS`Shoaib Meenai
This is a generalization of `_LIBCPP_NEW_DELETE_VIS`; the new macro name captures the semantics better, and also allows us to get rid of the `_WIN32` check in `include/new`. No functional change. Differential Revision: https://reviews.llvm.org/D26702 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@287164 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-16Fix non-reserved name usageEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@287080 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-15[CUDA] Mark __libcpp_{isnan,isinf,isfinite} as constexpr.Justin Lebar
Summary: This makes these functions available on host and device, which is necessary to compile <complex> for the device. Reviewers: hfinkel, EricWF Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25403 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@287012 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-14Implement P0516: 'Clarify That shared_future’s Copy Operations have Wide ↵Marshall Clow
Contracts' which was adopted last week in Issaquah git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@286877 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-14Implement P0510 'Make future_error Constructible' adopted in IssaquahMarshall Clow
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@286864 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-14Fixes for LWG 2598, 2686, 2739, 2742, 2747, and 2759, which were adopted ↵Marshall Clow
last week in Issaquah git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@286858 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-14Add check-cxx-abilist target when supported.Eric Fiselier
This patch adds a `check-cxx-abilist` target which verifies the libc++.so ABI when the current build configuration matches the configuration used to generate the ABI lists. In order to make this change `HandleOutOfTreeLLVM.cmake` needed to be modified to include `LLVMConfig.cmake` so that `TARGET_TRIPLE` is defined. Hopefully the changes needed to accommodate this won't break existing build configurations. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@286789 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-13Implement LWG 2770 - Make tuple_size<T> defined for all TEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@286779 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-13Fix PR30979 - tuple<move_only> is constructible from move_only const&Eric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@286774 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-08[libc++] Remove unnecessary MSVCRT exclusionsShoaib Meenai
Visual Studio 2013 and up have these functions, and we don't need to support older versions. There are some remaining _LIBCPP_MSVCRT exclusions which are present on Visual Studio 2015 but not 2013. Those will be addressed in a follow-up. Differential Revision: https://reviews.llvm.org/D26377 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@286202 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-02Implement another part of P0031; adding constexpr to move_iteratorMarshall Clow
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@285818 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-02Fix GCC test failure caused by manually defining _LIBCPP_HAS_NO_VARIADICSEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@285788 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-02Fix __libcpp_is_constructible for source types with explicit conversion ↵Eric Fiselier
operators. Previously __libcpp_is_constructible checked the validity of reference construction using 'eat<To>(declval<From>())' but this doesn't consider From's explicit conversion operators. This patch teaches __libcpp_is_constructible how to handle these cases. To do this we need to check the validity using 'static_cast<To>(declval<From>())'. Unfortunately static_cast allows additional base-to-derived and lvalue-to-rvalue conversions, which have to be checked for and manually rejected. While implementing these changes I discovered that Clang incorrectly rejects `static_cast<int&&>(declval<float&>())` even though `int &&X(declval<float&>())` is well formed. In order to tolerate this bug the `__eat<T>(...)` needs to be left in-place. Otherwise it could be replaced entirely with the new static_cast implementation. Thanks to Walter Brown for providing the test cases. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@285786 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-31[libc++] Add configuration define for off_t functionsShoaib Meenai
Create this define in __config and use it elsewhere, instead of checking the operating system/library defines in other files. The aim is to reduce the usage of _WIN32 outside __config. No functional change. Differential Revision: https://reviews.llvm.org/D25741 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@285582 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-31Add 'inline' but not 'always_inline' to std::strings destructor.Eric Fiselier
Adding both 'inline' and 'always_inline' to the destructor has been contentious. However most of the performance benefits can be gained by only adding 'inline', and there is no reason to hold up that change while discussing the other. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@285538 91177308-0d34-0410-b5e6-96231b3b80d8