summaryrefslogtreecommitdiffstats
path: root/libcxx/include
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix -Wshadow warnings and enable warnings by default for C++ >= 11Eric Fiselier2016-12-031-2/+3
| | | | llvm-svn: 288564
* Fix C++03 buildEric Fiselier2016-12-022-2/+2
| | | | llvm-svn: 288555
* Make variant's index part of the hash valueEric Fiselier2016-12-022-1/+14
| | | | llvm-svn: 288554
* Fix generated warnings in <variant>Eric Fiselier2016-12-021-4/+5
| | | | llvm-svn: 288552
* Implement C++17 <variant>. Patch from Michael Park!Eric Fiselier2016-12-021-0/+1553
| | | | | | This patch was reviewed as https://reviews.llvm.org/D23263. llvm-svn: 288547
* [libcxx] remove unused codeAditya Kumar2016-11-291-70/+2
| | | | | | | | | The macro _LIBCPP_UNROLL_LOOPS isn't used anywhere so the code was dead. Differential Revision: https://reviews.llvm.org/D26991 llvm-svn: 288143
* Implement conjuntion/disjuntion/negation for LFTS v2. Same code and tests ↵Marshall Clow2016-11-261-0/+18
| | | | | | for the ones in std:: llvm-svn: 287988
* Implement the 'detection idiom' from LFTS v2Marshall Clow2016-11-261-0/+85
| | | | llvm-svn: 287981
* Fix __hash_table::max_size() on 32 bit systemsEric Fiselier2016-11-231-2/+1
| | | | llvm-svn: 287749
* [libcxx] Fix max_size() across all containersEric Fiselier2016-11-236-9/+28
| | | | | | | | | | | | 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 llvm-svn: 287729
* Allow libc++ to use modules in C++03.Eric Fiselier2016-11-221-1/+0
| | | | | | | | | 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. llvm-svn: 287693
* Attempt to fix stdint/cstdint modules try 2Eric Fiselier2016-11-221-1/+8
| | | | llvm-svn: 287690
* Cleanup module.modulemapEric Fiselier2016-11-221-369/+1
| | | | llvm-svn: 287687
* Revert r287435 because of OS X test failuresEric Fiselier2016-11-211-5/+369
| | | | llvm-svn: 287531
* Fix stdint/cstdint modulesEric Fiselier2016-11-191-369/+5
| | | | llvm-svn: 287435
* [libcxx] Implement locale.h to fix modules buildEric Fiselier2016-11-192-1/+52
| | | | | | | | | | | | | | | | | | 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 llvm-svn: 287413
* Remove _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONSEric Fiselier2016-11-186-257/+12
| | | | | | | | 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. llvm-svn: 287321
* [libc++] Fix preprocessor guard for overload declarationShoaib Meenai2016-11-181-1/+1
| | | | | | | | | 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 llvm-svn: 287309
* Workaround compilers w/o C++1z inline variablesEric Fiselier2016-11-172-3/+17
| | | | llvm-svn: 287255
* Implement P0504R0: Revisiting in-place tag types for any/optional/variantEric Fiselier2016-11-172-56/+32
| | | | llvm-svn: 287250
* [libc++] Introduce `_LIBCPP_OVERRIDABLE_FUNC_VIS`Shoaib Meenai2016-11-162-26/+27
| | | | | | | | | | 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 llvm-svn: 287164
* Fix non-reserved name usageEric Fiselier2016-11-161-1/+1
| | | | llvm-svn: 287080
* [CUDA] Mark __libcpp_{isnan,isinf,isfinite} as constexpr.Justin Lebar2016-11-151-6/+6
| | | | | | | | | | | | | | 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 llvm-svn: 287012
* Implement P0516: 'Clarify That shared_future’s Copy Operations have Wide ↵Marshall Clow2016-11-141-3/+3
| | | | | | Contracts' which was adopted last week in Issaquah llvm-svn: 286877
* Implement P0510 'Make future_error Constructible' adopted in IssaquahMarshall Clow2016-11-141-2/+4
| | | | llvm-svn: 286864
* Fixes for LWG 2598, 2686, 2739, 2742, 2747, and 2759, which were adopted ↵Marshall Clow2016-11-148-6/+47
| | | | | | last week in Issaquah llvm-svn: 286858
* Add check-cxx-abilist target when supported.Eric Fiselier2016-11-141-6/+10
| | | | | | | | | | | | | 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. llvm-svn: 286789
* Implement LWG 2770 - Make tuple_size<T> defined for all TEric Fiselier2016-11-132-2/+2
| | | | llvm-svn: 286779
* Fix PR30979 - tuple<move_only> is constructible from move_only const&Eric Fiselier2016-11-131-4/+4
| | | | llvm-svn: 286774
* [libc++] Remove unnecessary MSVCRT exclusionsShoaib Meenai2016-11-083-14/+0
| | | | | | | | | | | | 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 llvm-svn: 286202
* Implement another part of P0031; adding constexpr to move_iteratorMarshall Clow2016-11-021-70/+76
| | | | llvm-svn: 285818
* Fix GCC test failure caused by manually defining _LIBCPP_HAS_NO_VARIADICSEric Fiselier2016-11-021-2/+2
| | | | llvm-svn: 285788
* Fix __libcpp_is_constructible for source types with explicit conversion ↵Eric Fiselier2016-11-021-22/+63
| | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 285786
* [libc++] Add configuration define for off_t functionsShoaib Meenai2016-10-312-3/+9
| | | | | | | | | | 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 llvm-svn: 285582
* Add 'inline' but not 'always_inline' to std::strings destructor.Eric Fiselier2016-10-311-1/+1
| | | | | | | | 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. llvm-svn: 285538
* Remove additional function template definitions from the dylibEric Fiselier2016-10-311-1/+1
| | | | llvm-svn: 285537
* Optimize filesystem::path by providing weaker exception guarantees.Eric Fiselier2016-10-312-26/+30
| | | | | | | | | | | | | | path uses string::append to construct, append, and concatenate paths. Unfortunatly string::append has a strong exception safety guaranteed and if it can't prove that the iterator operations don't throw then it will allocate a temporary string copy to append to. However this extra allocation and copy is very undesirable for path which doesn't have the same exception guarantees. To work around this this patch adds string::__append_forward_unsafe which exposes the std::string::append interface for forward iterators without enforcing that the iterator is noexcept. llvm-svn: 285532
* Fix _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY to always have default visibility.Eric Fiselier2016-10-311-5/+1
| | | | | | | | | | | This prevent the symbols from being both externally available and hidden, which causes them to be linked incorrectly. This is only a problem when the address of the function is explicitly taken since it will always be inlined otherwise. This patch fixes the issues that caused r285456 to be reverted, and can now be reapplied. llvm-svn: 285531
* Improve performance of constructing filesystem::path from strings.Eric Fiselier2016-10-301-3/+4
| | | | | | | | | | | | | This patch fixes a performance bug when constructing or appending to a path from a string or c-string. Previously we called 'push_back' to append every single character. This caused multiple re-allocation and copies when at most one reallocation is necessary. The new behavior is to simply call `string::append` so it can correctly handle reallocation. For large strings this change is a ~4x improvement. This also makes our path faster to construct than libstdc++'s. llvm-svn: 285530
* Rewrite std::filesystem::path iterators and parserEric Fiselier2016-10-301-6/+19
| | | | | | | | | | | | | | | | | | | | | | This patch entirely rewrites the parsing logic for paths. Unlike the previous implementation this one stores information about the current state; For example if we are in a trailing separator or a root separator. This avoids the need for extra lookahead (and extra work) when incrementing or decrementing an iterator. Roughly this gives us a 15% speedup over the previous implementation. Unfortunately this implementation is still a lot slower than libstdc++'s. Because libstdc++ pre-parses and splits the path upon construction their iterators are trivial to increment/decrement. This makes libc++ lazy parsing 100x slower than libstdc++. However the pre-parsing libstdc++ causes a ton of extra and unneeded allocations when constructing the string. For example `path("/foo/bar/")` would require at least 5 allocations with libstdc++ whereas libc++ uses only one. The non-allocating behavior is much preferable when you consider filesystem usages like 'exists("/foo/bar/")'. Even then libc++'s path seems to be twice as slow to simply construct compared to libstdc++. More investigation is needed about this. llvm-svn: 285526
* Revert "Added 'inline' attribute to basic_string's destructor"Mehdi Amini2016-10-291-1/+0
| | | | | | This reverts commit r285456, which broke LTO bootstrap on Darwin. llvm-svn: 285485
* Revert addition of __libcpp_library_versionEric Fiselier2016-10-281-9/+0
| | | | llvm-svn: 285466
* Added 'inline' attribute to basic_string's destructorAditya Kumar2016-10-281-0/+1
| | | | | | | | | | | | | | | | | Author: laxmansole Reviewers: howard.hinnant mclow.lists Subscribers: EricWF, flyingforyou, evandro Differential Revision: https://reviews.llvm.org/D25624 Reapplying the patch as the bug https://llvm.org/bugs/show_bug.cgi?id=30341 is fixed. Currently basic_string's destructor is not getting inlined. So adding 'inline' attribute to ~basic_string(). Worked in collaboration with Aditya Kumar. llvm-svn: 285456
* Try 2 to add extern C++ to __libcpp_library_versionEric Fiselier2016-10-281-1/+3
| | | | llvm-svn: 285427
* Explicitly specify extern "C++" on __libcpp_library_versionEric Fiselier2016-10-281-1/+1
| | | | llvm-svn: 285403
* Add __libcpp_version file and __libcpp_library_version function.Eric Fiselier2016-10-282-0/+8
| | | | | | | | | | | | | | | This patch does two seperate things. First it adds a file called "__libcpp_version" which only contains the current libc++ version (currently 4000). This file is not intended for use as a header. This file is used by Clang in order to easily determine the installed libc++ version. This allows Clang to enable/disable certain language features only when the library supports them. The second change is the addition of _LIBCPP_LIBRARY_VERSION macro, which returns the version of the installed dylib since it may be different than the headers. llvm-svn: 285382
* [libcxx] Make regex_match backtrack when search failsTim Shen2016-10-271-10/+33
| | | | | | | | | | | | | | | | Summary: Fixes PR19851. alg.re.match/ecma.pass.cpp still XFAILS on linux, but after commenting out locale-related tests, it passes. I don't have a freebsd machine to produce a full pass. Reviewers: mclow.lists Subscribers: cfe-commits, emaste Differential Revision: https://reviews.llvm.org/D26026 llvm-svn: 285352
* Move 'quoted' for string_view from <string_view> to <iomanip> (where the ↵Marshall Clow2016-10-272-12/+9
| | | | | | other versions of 'quoted' live. No functional change. llvm-svn: 285300
* Fix nullptr testsEric Fiselier2016-10-251-4/+0
| | | | llvm-svn: 285117
* [libc++] Fix modules build - Rework __refstring definition Eric Fiselier2016-10-252-108/+102
| | | | | | | | | | | | | | | Summary: `__libcpp_refstring` currently has two different definitions. First there is the complete definition in `<__refstring>` but there is also a second in `<stdexcept>`. The historical reason for this split is because both libc++ and libc++abi need to see the inline definitions of __libcpp_refstrings methods, but the `<stdexcept>` header doesn't. However this is an ODR violation and breaks the modules build. This patch fixes the issue by creating a single class definition in `<stdexcept>` and changing `<__refstring>` to contain only the inline method definitions. This way both `libcxx/src/stdexcept.cpp` and `libcxxabi/src/stdexcept.cpp` see the same declaration in `<stdexcept>` and definitions in `<__refstring>` Reviewers: mclow.lists, EricWF Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25603 llvm-svn: 285100
OpenPOWER on IntegriCloud