summaryrefslogtreecommitdiffstats
path: root/libcxx
Commit message (Collapse)AuthorAgeFilesLines
* More fuzzing infastructre - regexMarshall Clow2017-10-128-3/+287
| | | | llvm-svn: 315582
* Mark test as a long-testRoger Ferrer Ibanez2017-10-121-0/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D38452 llvm-svn: 315570
* Remove unneeded typename from testRoger Ferrer Ibanez2017-10-102-2/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D38628 llvm-svn: 315278
* [libc++] Support Microsoft ABI without vcruntime headersShoaib Meenai2017-10-0912-27/+137
| | | | | | | | | | | | | | | | | The vcruntime headers are hairy and clash with both libc++ headers themselves and other libraries. libc++ normally deals with the clashes by deferring to the vcruntime headers and silencing its own definitions, but for clients which don't want to depend on vcruntime headers, it's desirable to support the opposite, i.e. have libc++ provide its own definitions. Certain operator new/delete replacement scenarios are not currently supported in this mode, which requires some tests to be marked XFAIL. The added documentation has more details. Differential Revision: https://reviews.llvm.org/D38522 llvm-svn: 315234
* [libc++] Clarify names of ABI forcing macrosShoaib Meenai2017-10-053-9/+15
| | | | | | | | | Make it clear that these are intended only to force a specific ABI when the autodetection would give the wrong result by renaming the cmake options and adding separate forcing macros, as suggested by EricWF in the post-commit review of r314949 and further discussed on IRC. llvm-svn: 314965
* [libc++] Move cache variable definition. NFCShoaib Meenai2017-10-041-1/+1
| | | | | | Move it to where the other ABI cache variables/options are defined. llvm-svn: 314950
* [libc++] Allow users to explicitly specify ABIShoaib Meenai2017-10-043-5/+19
| | | | | | | | | | libc++'s current heuristic for detecting Itanium vs. Microsoft ABI falls short in some cases. For example, it will detect windows-itanium targets as using the Microsoft ABI, since they set `_MSC_VER` (for compatibility with Microsoft headers). Leave the current heuristic in place by default but also allow users to explicitly specify the ABI if need be. llvm-svn: 314949
* Fix accidental assignment inside test assertsEric Fiselier2017-10-042-2/+2
| | | | llvm-svn: 314947
* [libc++] Add site config option for ABI macrosShoaib Meenai2017-10-044-1/+23
| | | | | | | | | | | | | | | | | Some ABI macros affect headers, so it's nice to have a site config option for them. Add a LIBCXX_ABI_DEFINES cmake macro to allow specifying a list of ABI macros to define in the site config. The primary design constraint (as discussed with Eric on IRC a while back) was to not have to repeat the ABI macro names in cmake, which only leaves a free-form cmake list as an option. A somewhat unfortunate consequence is that we can't verify that the ABI macros being defined actually exist, though we can at least perform some basic sanity checking, since all the ABI macros begin with _LIBCPP_ABI_. Differential Revision: https://reviews.llvm.org/D36719 llvm-svn: 314946
* Initial cut at infastructure for fuzzing support for OSS-fuzzMarshall Clow2017-10-048-0/+483
| | | | llvm-svn: 314940
* Add C++17 explicit deduction guides to std::pair.Eric Fiselier2017-10-044-4/+90
| | | | | | | This patch adds the newly standardized deduction guides for std::pair, allowing it to work class template deduction. llvm-svn: 314864
* Fix test suite misconfiguration on OS XEric Fiselier2017-10-031-2/+2
| | | | llvm-svn: 314755
* Improve test runner output for broken configurations.Eric Fiselier2017-10-022-6/+16
| | | | | | | | | | | | | Previously LIT would often fail while attempting to set up/configure the test compiler; normally when attempting to dump the builtin macros. This sort of failure provided no useful information about what went wrong with the compiler, making the actual issues hard --- if not impossible --- to debug easily. This patch changes the LIT configuration to report the failure explicitly, including the failed compile command and the stdout/stderr output. llvm-svn: 314735
* [test] Allow other implementations to strengthen noexcept on deque's move ↵Casey Carter2017-09-301-1/+1
| | | | | | constructor llvm-svn: 314608
* [test] forwardlist.cons/move_noexcept.pass.cppCasey Carter2017-09-281-1/+1
| | | | | | * Don't forbid non-libc++ implementations from strengthening noexcept on forward_list's move constructor. llvm-svn: 314459
* [libcxx] [test] Fix unused local typedef warnings.Stephan T. Lavavej2017-09-261-2/+2
| | | | llvm-svn: 314259
* [libcxx] [test] Strip trailing whitespace.Stephan T. Lavavej2017-09-261-1/+1
| | | | llvm-svn: 314258
* [libcxx] [test] Silence warning C4324 for MSVC.Stephan T. Lavavej2017-09-261-0/+1
| | | | | | | | This warning "structure was padded due to alignment specifier" says that the compiler is going to do exactly what you asked it to do. It's triggered by the tests for over-aligned dynamic memory allocation. llvm-svn: 314257
* Revert 313789 because gcc doesn't like itMarshall Clow2017-09-202-8/+8
| | | | llvm-svn: 313803
* Mark the __eval methods on independent_bits_engine (and ↵Marshall Clow2017-09-202-8/+8
| | | | | | __independent_bits_engine) as const, since they make no changes to the object. NFC. llvm-svn: 313789
* Fix a bit of UB in __independent_bits_engine. Fixes PR#34663Marshall Clow2017-09-201-2/+3
| | | | llvm-svn: 313776
* Make libcxx tests work when llvm sources are not present.Zachary Turner2017-09-201-7/+10
| | | | | | | | | | | | | | | | | | | Despite a strong CMake warning that this is an unsupported libcxx build configuration, some bots still rely on being able to check out lit and libcxx independently with no LLVM sources, and then run lit against libcxx. A previous patch broke that workflow, so this is making it work again. Unfortunately, it breaks generation of the llvm-lit script for libcxx, but we will just have to live with that until a solution is found that allows libcxx to make more use of llvm build pieces. libcxx can still run tests by using the ninja check target, or by running lit.py directly against the build tree or source tree. Differential Revision: https://reviews.llvm.org/D38057 llvm-svn: 313763
* [libc++] Replace __sync_* functions with __libcpp_atomic_* functionsWeiming Zhao2017-09-197-12/+34
| | | | | | | | | | | | | | | | Summary: This patch replaces __sync_* with __libcpp_atomic_* and adds a wrapper function for __atomic_exchange to support _LIBCPP_HAS_NO_THREADS. Reviewers: EricWF, jroelofs, mclow.lists, compnerd Reviewed By: EricWF, compnerd Subscribers: compnerd, efriedma, cfe-commits, joerg, llvm-commits Differential Revision: https://reviews.llvm.org/D35235 llvm-svn: 313694
* Resubmit "Fix llvm-lit script generation in libcxx."Zachary Turner2017-09-193-3/+17
| | | | | | | | After speaking with the libcxx owners, they agreed that this is a bug in the bot that needs to be fixed by the bot owners, and the CMake changes are correct. llvm-svn: 313643
* Revert "Fix llvm-lit script generation in libcxx."Zachary Turner2017-09-193-17/+3
| | | | | | | | | | | | This reverts commit 4ad71811d45268d81b60f27e3b8b2bcbc23bd7b9. There is a bot that is checking out libcxx and lit with nothing else and then running lit.py against the test tree. Since there's no LLVM source tree, there's no LLVM CMake. CMake actually reports this as a warning saying unsupported libcxx configuration, but I guess someone is depending on it anyway. llvm-svn: 313607
* Fix llvm-lit script generation in libcxx.Zachary Turner2017-09-193-3/+17
| | | | | | Differential Revision: https://reviews.llvm.org/D37997 llvm-svn: 313606
* Fix failing ASAN testEric Fiselier2017-09-181-2/+5
| | | | llvm-svn: 313576
* Fix two failing -verify tests to tolerate old and new clang versionsEric Fiselier2017-09-172-5/+5
| | | | llvm-svn: 313502
* Update changelog revisionEric Fiselier2017-09-171-1/+1
| | | | llvm-svn: 313501
* ABI: Fix for undefined "___cxa_deleted_virtual" symbol in MacOSXEric Fiselier2017-09-176-0/+30
| | | | | | | | | | | | | | | | | | | | | | Patch from Eddie Elizondo. Reviewed as D37830 (https://reviews.llvm.org/D37830). On MacOSX the following program: struct S { virtual void f() = delete; }; int main() { new S; } Fails with the following error: Undefined symbols for architecture x86_64: "___cxa_deleted_virtual" This adds a fix to export the needed symbols. Test: > lit -sv test/libcxx/language.support/cxa_deleted_virtual.pass.cpp > Testing Time: 0.21s > Expected Passes : 1 llvm-svn: 313500
* Fix failing -verify tests due to change in Clangs static_assert message.Eric Fiselier2017-09-1712-41/+41
| | | | | | | | Clang recently changed the way it outputs static assert diagnostics. This patch fixes libc++'s -verify tests so they tolerate both the old and new message format. llvm-svn: 313499
* [libc++] Account for Microsoft CRT const overloadsShoaib Meenai2017-09-151-0/+4
| | | | | | | | | | Microsoft's CRT already provides the const overloads, and it defines the `_CRT_CONST_CORRECT_OVERLOADS` macro to indicate their presence. Check for this macro before attempting to define our own const-correct overloads, to avoid compiler warnings about casts dropping const qualifiers. llvm-svn: 313377
* [libc++] Remove unnecessary struct tagShoaib Meenai2017-09-151-1/+1
| | | | | | It causes warnings about mismatched tags, and it's not needed. llvm-svn: 313345
* typeinfo: provide a partial implementation for Win32Saleem Abdulrasool2017-09-153-10/+99
| | | | | | | | | | | | | | | | | The RTTI structure is different on Windows when building under MS ABI. Update the definition to reflect this. The structure itself contains an area for caching the undecorated name (which is 0-initialized). The decorated name has a bitfield followed by the linkage name. When std::type_info::name is invoked for the first time, the runtime should undecorate the name, cache it, and return the undecorated name. This requires access to an implementation of __unDName. For now, return the raw name. This uses the fnv-1a hash to hash the name of the RTTI. We could use an alternate hash (murmur? city?), but, this was the quickest to throw together. llvm-svn: 313344
* Fix accidental ADL in std::allocator_traits meta-programming.Eric Fiselier2017-09-159-6/+90
| | | | | | | | | | | There were a number of cases where __double_underscore functions, for example __has_construct_test, were called without being qualified, causing ADL to occur. This patch qualifies those calls to avoid this problem. Thanks to David L. Jones for point out the issue initially. llvm-svn: 313324
* [libc++] Prevent stale site configuration headersShoaib Meenai2017-09-141-1/+7
| | | | | | | | | | | If we define cmake macros that require a site config, and then undefine all such macros, a stale site config header will be left behind. Explicitly delete any generate site config if we don't need one to avoid this. Differential Revision: https://reviews.llvm.org/D36720 llvm-svn: 313284
* Use CMAKE_AR instead of the system default 'ar' for merging static librariesMartin Storsjo2017-09-132-3/+10
| | | | | | | | | | | | | | | Using the system default 'ar' might not be the right choice when cross compiling. Don't prepend the ar options by a dash, not all ar implementations support that (llvm-ar doesn't). Also pass the 's' option when creating the merged library, to create an index. Differential Revision: https://reviews.llvm.org/D37134 llvm-svn: 313122
* Mark the new tests as unsupported when there are no exceptionsMarshall Clow2017-09-122-2/+4
| | | | llvm-svn: 313092
* libcxx: fix merge_archives error variable nameMartell Malone2017-09-121-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D37728 llvm-svn: 313084
* Handle object files named *.obj in merge_archives.pyMartin Storsjo2017-09-121-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D37133 llvm-svn: 313072
* XFAIL a couple of new <regex> tests for C++03Marshall Clow2017-09-122-0/+2
| | | | llvm-svn: 313064
* Apply D28224: 'Throw exception after too many steps' Fixes PR#20291. Thanks ↵Marshall Clow2017-09-123-0/+112
| | | | | | to Tim Shen for the patch llvm-svn: 313056
* Make pbump (internally) handle sizes bigger than MAX_INT. Fixes PR#33725 - ↵Marshall Clow2017-09-126-14/+66
| | | | | | thanks to Jonathan Wakely for the report llvm-svn: 313031
* mark mersenne_twister_engine<>::seed(result_type __sd) with ↵Marshall Clow2017-09-111-0/+1
| | | | | | _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK to placate UBSAN. Fixes PR#34160 llvm-svn: 312932
* Add include of <string> to <system_error>, since things in there return ↵Marshall Clow2017-09-113-0/+22
| | | | | | strings. Fixes PR#34529. llvm-svn: 312923
* Fix PR34298 - Allow std::function with an incomplete return type.Eric Fiselier2017-09-103-26/+54
| | | | | | | | | | | | | This patch fixes llvm.org/PR34298. Previously libc++ incorrectly evaluated the __invokable trait via the converting constructor `function(Tp)` [with Tp = std::function] whenever the copy constructor or copy assignment operator was required. This patch further constrains that constructor to short circut before evaluating the troublesome SFINAE when `Tp` matches std::function. The original patch is from Alex Lorenz. llvm-svn: 312892
* Revert "Fix PR34298 - Allow std::function with an incomplete return type."Eric Fiselier2017-09-103-54/+26
| | | | | | | | | | | This reverts commit r312890 because the test case fails to compile for older versions of Clang that reject initializing a const object without a user defined constructor. Since this patch should go into 5.0.1, I want to keep it an atomic change, and will re-commit it with a fixed test case. llvm-svn: 312891
* Fix PR34298 - Allow std::function with an incomplete return type.Eric Fiselier2017-09-103-26/+54
| | | | | | | | | | | | | This patch fixes llvm.org/PR34298. Previously libc++ incorrectly evaluated the __invokable trait via the converting constructor `function(Tp)` [with Tp = std::function] whenever the copy constructor or copy assignment operator was required. This patch further constrains that constructor to short circut before evaluating the troublesome SFINAE when `Tp` matches std::function. The original patch is from Alex Lorenz. llvm-svn: 312890
* XFAIL tests on SLES11Brian Cain2017-09-084-2/+7
| | | | | | | XFAIL some failing tests for SLES11 (older glibc), also replace spaces in linux distro w/dashes. llvm-svn: 312774
* Add even more string_view tests. These found some bugs in the default ↵Marshall Clow2017-09-079-6/+1422
| | | | | | parameter value for rfind/find_last_of/find_last_not_of llvm-svn: 312693
OpenPOWER on IntegriCloud