summaryrefslogtreecommitdiffstats
path: root/libcxx
Commit message (Collapse)AuthorAgeFilesLines
* [libc++] Remove unneeded visibility pragmasShoaib Meenai2016-11-231-4/+0
| | | | | | | | | | The function definitions being guarded by the pragma were all static, so they wouldn't be exported anyway. In any case, we should prefer the visibility macros. No functional change. Differential Revision: https://reviews.llvm.org/D26940 llvm-svn: 287768
* Fix __hash_table::max_size() on 32 bit systemsEric Fiselier2016-11-232-3/+3
| | | | llvm-svn: 287749
* Don't "LIBCPP_ONLY(stuff;)" at namespace scope.Casey Carter2016-11-231-3/+3
| | | | | | Differential review: https://reviews.llvm.org/D27029 llvm-svn: 287732
* [libcxx] Fix max_size() across all containersEric Fiselier2016-11-2320-109/+425
| | | | | | | | | | | | 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
* Add <variant> tests but disable them for libc++Eric Fiselier2016-11-2342-1/+5067
| | | | llvm-svn: 287728
* 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-226-18/+108
| | | | llvm-svn: 287690
* Cleanup module.modulemapEric Fiselier2016-11-221-369/+1
| | | | llvm-svn: 287687
* Revert r287435 because of OS X test failuresEric Fiselier2016-11-215-87/+369
| | | | llvm-svn: 287531
* Mark variadic lock guard tests as XFAIL with modules, since they have to ↵Eric Fiselier2016-11-217-1/+24
| | | | | | define macros to expose the new ABI llvm-svn: 287513
* Adjust uses_alloc_types helpers for later changesEric Fiselier2016-11-211-2/+17
| | | | llvm-svn: 287512
* Fix stdint/cstdint modulesEric Fiselier2016-11-195-369/+87
| | | | llvm-svn: 287435
* Mark test as unsupported in C++03Eric Fiselier2016-11-191-0/+1
| | | | llvm-svn: 287417
* [libcxx] Implement locale.h to fix modules buildEric Fiselier2016-11-195-1/+128
| | | | | | | | | | | | | | | | | | 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
* [libcxx] [test] D26812: In random tests, use real static_asserts and silence ↵Stephan T. Lavavej2016-11-186-20/+84
| | | | | | | | | | | | | a warning. In C++11 mode and newer, use real static_asserts. In C++03 mode, min() and max() aren't constexpr, so use plain asserts. One test triggers MSVC's warning C4310 "cast truncates constant value". The code is valid, and yet the warning is valid, so I'm silencing it through push-disable-pop. llvm-svn: 287391
* Allow using libsupc++ with LIBCXX_ENABLE_STATIC_ABI_LIBRARY. Patch from ↵Eric Fiselier2016-11-181-5/+13
| | | | | | | | | | | | | | | | | | | | | | Michael Daniels. The code cannot currently link when using libsupc++ with the LIBCXX_ENABLE_STATIC_ABI_LIBRARY option. This change ifdef's out the the destructor and 'what' function for bad_array_length and bad_array_new_length when GLIBCXX is defined. The constructors that are left in are the only functions not being provided by libsupc++ itself, and follows the same pattern that was used to ifdef bad_alloc. Testing was done on a Linux x86_64 host using GCC 5.4 and libc++ from ToT. I see no change to the test results when using libsup++ or libstdc++ without LIBCXX_ENABLE_STATIC_ABI_LIBRARY. When using libsupc++ with LIBCXX_ENABLE_STATIC_ABI_LIBRARY it will now build and test results are the same as those without the option specified. Reviewed as https://reviews.llvm.org/D26186 llvm-svn: 287388
* [libcxx] [test] D26816: Fix non-Standard assumptions when testing sample().Stephan T. Lavavej2016-11-181-3/+14
| | | | | | | | | | | | | sample() isn't specified with a reproducible algorithm, so expecting exact output is non-Standard. Mark those tests with LIBCPP_ASSERT. In test_small_population(), we're guaranteed to get all of the elements, but not necessarily in their original order. When PopulationCategory is forward, we're guaranteed stability (and can therefore test equal()). Otherwise, we can only test is_permutation(). (As it happens, both libcxx and MSVC's STL provide stability in this scenario for input-only iterators.) llvm-svn: 287383
* [libcxx] [test] D26815: Fix an assumption about the state of moved-from ↵Stephan T. Lavavej2016-11-181-2/+2
| | | | | | | | | | | std::functions. The Standard doesn't provide any guarantees beyond "valid but unspecified" for moved-from std::functions. libcxx moves from small targets and leaves them there, while MSVC's STL empties out the source. Mark these assertions as libcxx-specific. llvm-svn: 287382
* [libcxx] [test] D26813: allocator<const T> is non-Standard.Stephan T. Lavavej2016-11-182-18/+18
| | | | | | | | | | N4582 17.6.3.5 [allocator.requirements] says that allocators are given cv-unqualified object types, and N4582 20.9.9 [default.allocator] implies that allocator<const T> is ill-formed (due to colliding address() overloads). Therefore, tests for allocator<const T> should be marked as libcxx-specific (if not removed outright). llvm-svn: 287381
* Make LIBCXX_ENABLE_STATIC_ABI_LIBRARY merge libc++.a and libc++abi.aEric Fiselier2016-11-183-9/+45
| | | | llvm-svn: 287373
* Make merge_archives.py executableEric Fiselier2016-11-181-0/+0
| | | | llvm-svn: 287337
* Add merge_archives.py utilityEric Fiselier2016-11-181-0/+119
| | | | llvm-svn: 287336
* 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
* update Apples ABI list to ignore non-std symbolsEric Fiselier2016-11-182-2475/+2488
| | | | llvm-svn: 287301
* Change sym_check to filter non-stdlib symbols.Eric Fiselier2016-11-186-2013/+1948
| | | | | | | | | | | Currently sym_check almost all names found in the binary, including those which are defined in other libraries. This makes our ABI lists harder to maintain. This patch adds a --only-stdlib-symbols option to sym_check which removes all symbols which aren't possibly provided by libc++. It also re-generates the linux ABI list after making this change. llvm-svn: 287294
* Workaround compilers w/o C++1z inline variablesEric Fiselier2016-11-172-3/+17
| | | | llvm-svn: 287255
* Remove files missed in r287250Eric Fiselier2016-11-171-36/+0
| | | | llvm-svn: 287251
* Implement P0504R0: Revisiting in-place tag types for any/optional/variantEric Fiselier2016-11-172-56/+32
| | | | llvm-svn: 287250
* Test changes for P0504R0 "Revisiting in-place tag types for ↵Eric Fiselier2016-11-175-86/+54
| | | | | | any/optional/variant". Patch from Casey Carter llvm-svn: 287249
* [libc++] Introduce `_LIBCPP_OVERRIDABLE_FUNC_VIS`Shoaib Meenai2016-11-164-60/+59
| | | | | | | | | | 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 -verify tests for older ccache versionsEric Fiselier2016-11-161-2/+8
| | | | llvm-svn: 287109
* Fix non-reserved name usageEric Fiselier2016-11-161-1/+1
| | | | llvm-svn: 287080
* [libcxx] Mark xonstexpr-fns.pass.cpp as XFAIL: gcc.Justin Lebar2016-11-151-0/+4
| | | | | | | This fails with gcc because __builtin_isnan and friends, which libcpp_isnan and friends call, are not themselves constexpr-evaluatable. llvm-svn: 287041
* Add .clang-format to libc++Eric Fiselier2016-11-151-0/+1
| | | | | | | | | | | | | | | Adding a Clang Format file to libc++ and which style it should use has been discussed a couple of times. This patch finally adds a .clang-format file which specifies LLVM styles. Personally I dislike how the LLVM style handles much of the meta-programming in libc++. However the general consensus was that libc++ should prefer the LLVM style and make adjustments where needed. Note that using clang-format on changes is not required, especially for changes within the headers. However formatting tests should be encouraged. llvm-svn: 287020
* [CUDA] Mark __libcpp_{isnan,isinf,isfinite} as constexpr.Justin Lebar2016-11-152-6/+35
| | | | | | | | | | | | | | 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
* Revert "P0503R0, adopted in Issaquah, rewords some requirements on nullptr_t ↵Vedant Kumar2016-11-154-46/+6
| | | | | | | | | | | | | and istream_iterator. No code changes were needed, but I updated a few tests. Also resolved P0509 and P0521, which required no changes to the library or tests." This reverts commit r286884, because it breaks the Xcode 7 builders: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-expensive/1583 Here is a PR that tracks the issue: https://llvm.org/bugs/show_bug.cgi?id=31016 llvm-svn: 287004
* [libcxx] [test] D26627: Fix ordering assumptions in unordered container tests.Stephan T. Lavavej2016-11-153-32/+17
| | | | llvm-svn: 286984
* [libcxx] [test] D26625: future_error::what() is implementation-defined.Stephan T. Lavavej2016-11-151-4/+6
| | | | llvm-svn: 286983
* [libcxx] [test] D26624: Fix bucket_count() assumptions.Stephan T. Lavavej2016-11-158-96/+96
| | | | | | | | | With a max_load_factor of 1.0, the only guarantee is that bucket_count() >= size(). (Note: setting max_load_factor without rehashing isn't supposed to affect this, because setting max_load_factor is currently specified to be constant time.) llvm-svn: 286982
* Missed one of the try blocks the first time :-(. Thanks to Renato for the ↵Marshall Clow2016-11-151-3/+13
| | | | | | heads up. llvm-svn: 286932
* P0503R0, adopted in Issaquah, rewords some requirements on nullptr_t and ↵Marshall Clow2016-11-144-6/+46
| | | | | | istream_iterator. No code changes were needed, but I updated a few tests. Also resolved P0509 and P0521, which required no changes to the library or tests. llvm-svn: 286884
* Missed a test with exceptions disabled earlier. Oops.Marshall Clow2016-11-141-4/+14
| | | | llvm-svn: 286883
* Implement P0516: 'Clarify That shared_future’s Copy Operations have Wide ↵Marshall Clow2016-11-144-4/+16
| | | | | | Contracts' which was adopted last week in Issaquah llvm-svn: 286877
* Make one of the new tests fail correctly on pre-C++17 systemsMarshall Clow2016-11-141-0/+6
| | | | llvm-svn: 286872
* Implement P0510 'Make future_error Constructible' adopted in IssaquahMarshall Clow2016-11-143-3/+19
| | | | llvm-svn: 286864
* Fixes for LWG 2598, 2686, 2739, 2742, 2747, and 2759, which were adopted ↵Marshall Clow2016-11-1425-16/+504
| | | | | | last week in Issaquah llvm-svn: 286858
* [libcxx] [test] D26314: Fix MSVC warning C4189 "local variable is ↵Stephan T. Lavavej2016-11-1431-270/+216
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | initialized but not referenced". test/std/depr/depr.c.headers/inttypes_h.pass.cpp test/std/input.output/file.streams/c.files/cinttypes.pass.cpp test/std/input.output/iostream.forward/iosfwd.pass.cpp Add test() to avoid a bunch of void-casts, although we still need a few. test/std/input.output/iostream.format/quoted.manip/quoted.pass.cpp skippingws was unused (it's unclear to me whether this was mistakenly copy-pasted from round_trip() below). test/std/localization/locale.categories/category.collate/locale.collate/types.pass.cpp test/std/localization/locale.categories/category.ctype/facet.ctype.special/types.pass.cpp test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char.pass.cpp test/std/localization/locale.categories/category.ctype/locale.codecvt/types_wchar_t.pass.cpp test/std/localization/locale.categories/category.ctype/locale.ctype/types.pass.cpp test/std/localization/locale.categories/facet.numpunct/locale.numpunct/types.pass.cpp test/std/localization/locales/locale.global.templates/use_facet.pass.cpp When retrieving facets, the references are unused. test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long.pass.cpp test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long.pass.cpp "std::ios_base::iostate err = ios.goodbit;" was completely unused here. test/std/localization/locale.categories/category.time/locale.time.get/time_base.pass.cpp test/std/numerics/c.math/ctgmath.pass.cpp test/std/numerics/rand/rand.device/entropy.pass.cpp test/std/numerics/rand/rand.device/eval.pass.cpp test/std/strings/basic.string/string.modifiers/string_copy/copy.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eof.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eof.pass.cpp test/std/thread/futures/futures.promise/dtor.pass.cpp test/std/thread/futures/futures.task/futures.task.members/dtor.pass.cpp test/std/thread/thread.condition/thread.condition.condvar/wait_for_pred.pass.cpp These variables are verifying types but are otherwise unused. test/std/strings/basic.string/string.capacity/reserve.pass.cpp old_cap was unused (it's unclear to me whether it was intended to be used). test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/eq.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eq.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/lt.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eq.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/lt.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/eq.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/lt.pass.cpp These tests contained unused characters. llvm-svn: 286847
* Update C++1z status with LWG papers from Issaquah.Marshall Clow2016-11-141-3/+23
| | | | llvm-svn: 286835
* Update C++1z status with LFTS issues from Issaquah.Marshall Clow2016-11-141-0/+6
| | | | llvm-svn: 286834
OpenPOWER on IntegriCloud