summaryrefslogtreecommitdiffstats
path: root/libcxxabi/test
Commit message (Collapse)AuthorAgeFilesLines
* [libcxxabi] Allow tests to link with static libc++abi/libc++ even if the ↵Sergej Jaskiewicz2020-01-092-2/+4
| | | | | | | | | | | | | | | | | | | | | | | shared version is present Summary: Right now the only way to force libc++abi tests to link with the static version of libc++abi is to set `LIBCXXABI_ENABLE_SHARED` to `OFF`. However, this doesn't work when libc++abi is built as standalone project because of [this](https://github.com/llvm/llvm-project/blob/54c522420347e58aa7bae1892cf5c5672b57c875/libcxxabi/CMakeLists.txt#L503-L519). This change allows specifying the version of the library for tests to link with. This is useful for remote testing, for example, with `SSHExecutor`, where we _have_ to link with libc++abi statically. Two new CMake options are introduced here: `LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXXABI` and `LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXX`. They can be set to `OFF` to tell the test utility to link tests with the static libraries. It shouldn't break anything, because the default values of these options are set such that the test utility will behave the same way. Reviewers: EricWF, mclow.lists, phosek, mehdi_amini, ldionne, jroelofs, bcraig Subscribers: mgorny, christof, ldionne, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D71894
* P1152R4: Fix deprecation warnings in libc++ testsuite and in uses of ↵Richard Smith2019-10-191-8/+8
| | | | | | | | | | | | | | | | is_invocable that would internally conjure up a deprecated function type. Summary: The implementation of P1152R4 in Clang has resulted in some deprecation warnings appearing in the libc++ and libc++abi test suite. Fix or suppress these warnings. Reviewers: mclow.lists, EricWF Subscribers: christof, ldionne, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D68879 llvm-svn: 375307
* [Testing] unbreak after r372963David Zarzycki2019-09-261-0/+1
| | | | llvm-svn: 372967
* Update XFAIL list for new GCC versionsEric Fiselier2019-09-131-1/+1
| | | | llvm-svn: 371881
* Fix incorrect demangling of call operator of lambda with explicitRichard Smith2019-09-091-1/+6
| | | | | | template parameters due to registering template parameters twice. llvm-svn: 371469
* Simplify demangler rule for lambda-expressions to match discussion onRichard Smith2019-09-091-1/+3
| | | | | | cxx-abi list. llvm-svn: 371462
* Implement demangling support for C++20 lambda expression extensions.Richard Smith2019-09-061-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | This implements demangling support for the mangling extensions specified in https://github.com/itanium-cxx-abi/cxx-abi/pull/85, much of which is implemented in Clang r359967 and r371004. Specifically, this provides demangling for: * <template-param-decl> in <lambda-sig> * <template-param> with non-zero level * lambda-expression literals (not emitted by Clang yet) * nullptr literals * string literals (The final two seem unrelated, but handling them was necessary in order to disambiguate between lambda expressions and the other forms of literal for which we have a type but no value.) When demangling a <lambda-sig>, we form template parameters with no corresponding argument, so we cannot substitute in the argument in the demangling. Instead we invent synthetic names for the template parameters (eg, '[]<typename $T>($T *x)'). llvm-svn: 371273
* small follow-up to r368604Nico Weber2019-08-121-3/+3
| | | | llvm-svn: 368605
* libcxxabi: Rename .hpp files to .hNico Weber2019-08-127-6/+6
| | | | | | | | LLVM uses .h as its extension for header files. Differential Revision: https://reviews.llvm.org/D65981 llvm-svn: 368604
* [libc++abi] Fix tests when pstl is enabledLouis Dionne2019-08-082-0/+4
| | | | llvm-svn: 368286
* [demangle] Support for C++2a char8_tErik Pilkington2019-06-281-0/+3
| | | | llvm-svn: 364677
* [demangle] Special case clang's creative mangling of __uuidof expressions.Erik Pilkington2019-06-181-0/+3
| | | | llvm-svn: 363752
* [demangle] Vendor extended types shouldn't be considered substitution candidatesErik Pilkington2019-06-101-1/+4
| | | | llvm-svn: 362983
* [libcxxabi] Add a test for invalid assumptions on the alignment of exceptionsLouis Dionne2019-05-171-0/+34
| | | | | | rdar://problem/49864414 llvm-svn: 361039
* XFAIL test for new GCC versionEric Fiselier2019-05-161-1/+1
| | | | llvm-svn: 360944
* Attempt to fix flaky tests.Eric Fiselier2019-05-021-188/+149
| | | | | | | | | | | The threaded cxa guard test attempted to test multithreaded waiting by lining up a bunch of threads at a held init lock and releasing them. The test initially wanted each thread to observe the lock being held, but some threads may arive too late. This patch cleans up the test and relaxes the restrictions. llvm-svn: 359785
* Remove XFail for new GCC. They fixed itEric Fiselier2019-04-291-1/+1
| | | | llvm-svn: 359415
* Cleanup new cxa guard implementation.Eric Fiselier2019-04-242-4/+45
| | | | | | | | * Add TSAN annotations around the futex syscalls. * Test that the futex syscall wrappers actually work. * Fix bad names. llvm-svn: 359069
* Work around GCC test failure.Eric Fiselier2019-04-241-2/+2
| | | | llvm-svn: 359065
* Rewrite cxa guard implementation.Eric Fiselier2019-04-242-0/+532
| | | | | | | | | | | | | This patch does three main things: (1) It re-writes the cxa guard implementation to make it testable. (2) Adds support for recursive init detection on non-apple platforms. (3) It adds a futex based implementation. The futex based implementation locks and notifies on a per-object basis, unlike the current implementation which uses a global lock for all objects. Once this patch settles I'll turn it on by default when supported. llvm-svn: 359060
* [libc++abi] Don't use a .sh.cpp test for uncaught_exceptionLouis Dionne2019-04-231-6/+0
| | | | | | | Otherwise, we don't seem to get the DYLD_LIBRARY_PATH set up correctly and the tests are run against the system libc++abi dylib. llvm-svn: 358937
* [libc++] Make sure we re-export some missing libc++abi symbols from libc++Louis Dionne2019-04-182-16/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Ensure we re-export __cxa_throw_bad_array_new_length and __cxa_uncaught_exceptions from libc++, since they are now provided by libc++abi. Doing this allows us to stop linking explicitly against libc++abi in the libc++abi tests, since libc++ re-exports all the necessary symbols. However, there is one caveat to that. We don't want libc++ to re-export __cxa_uncaught_exception (the singular form), since it's only provided for backwards compatibility. Hence, for the single test where we check this backwards compatibility, we explicitly link against libc++abi. PR27405 PR22654 Reviewers: EricWF Subscribers: christof, jkorous, dexonsmith, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D60424 llvm-svn: 358690
* [NFC] Correct outdated links to the Itanium C++ ABI documentationLouis Dionne2019-04-111-1/+1
| | | | | | | | Those are now hosted on GitHub. rdar://problem/36557462 llvm-svn: 358191
* Fix PR41395 - __cxa_vec_new may overflow in allocation size calculation.Eric Fiselier2019-04-051-0/+122
| | | | llvm-svn: 357814
* llvm-cxxfilt: Demangle gcc "old-style unified" ctors and dtorsNico Weber2019-04-031-0/+6
| | | | | | | | | | | These are variant 4, cf https://github.com/gcc-mirror/gcc/blob/master/gcc/cp/mangle.c#L1851 https://github.com/gcc-mirror/gcc/blob/master/gcc/cp/mangle.c#L1880 and gcc seems to sometimes emit them still. Differential Revision: https://reviews.llvm.org/D60229 llvm-svn: 357645
* [CMake] Support compiler-rt builtins library in testsPetr Hosek2019-02-051-1/+1
| | | | | | | | | | | | | | | | | | | | We're building tests with -nostdlib which means that we need to explicitly include the builtins library. When using libgcc (default) we can simply include -lgcc_s on the link line, but when using compiler-rt builtins we need a complete path to the builtins library. This path is already available in CMake as <PROJECT>_BUILTINS_LIBRARY, so we just need to pass that path to lit and if config.compiler_rt is true, link it to the test. Prior to this patch, running tests when compiler-rt is being used as the builtins library was broken as all tests would fail to link, but with this change running tests when compiler-rt bultins library is being used should be supported. Differential Revision: https://reviews.llvm.org/D56701 llvm-svn: 353208
* [CMake] Update lit test configurationPetr Hosek2019-02-052-7/+9
| | | | | | | | | There are several changes: - Don't stringify Pythonized bools (that's why we're Pythonizing them) - Support specifying target and sysroot via CMake variables - Use consistent spelling for --target, --sysroot, --gcc-toolchain llvm-svn: 353137
* [CMake] Support CMake variables for setting target, sysroot and toolchainPetr Hosek2019-02-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | CMake has a standard way of setting target triple, sysroot and external toolchain through CMAKE_<LANG>_COMPILER_TARGET, CMAKE_SYSROOT and CMAKE_<LANG>_COMPILER_EXTERNAL_TOOLCHAIN. These are turned into corresponding --target=, --sysroot= and --gcc-toolchain= variables add included appended to CMAKE_<LANG>_FLAGS. libunwind, libc++abi, libc++ provides their own mechanism through <PROJECT>_TARGET_TRIPLE, <PROJECT>_SYSROOT and <PROJECT>_GCC_TOOLCHAIN variables. These are also passed to lit via lit.site.cfg, and lit config uses these to set the corresponding compiler flags when building tessts. This means that there are two different ways of setting target, sysroot and toolchain, but only one is properly supported in lit. This change extends CMake build for libunwind, libc++abi and libc++ to also support the CMake variables in addition to project specific ones in lit. Differential Revision: https://reviews.llvm.org/D57670 llvm-svn: 353084
* Update more file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-1958-232/+174
| | | | | | | | | | | | | | | | | | to reflect the new license. These used slightly different spellings that defeated my regular expressions. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351648
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Remove unnecesasry comment markers.Chandler Carruth2019-01-191-8/+8
| | | | llvm-svn: 351635
* [demangler] Support for block literals.Erik Pilkington2019-01-171-0/+2
| | | | llvm-svn: 351482
* [demangler] Ignore leading underscores if presentErik Pilkington2019-01-171-0/+4
| | | | | | | On MacOS, symbols start with a leading underscore, so just parse and ignore it if present. llvm-svn: 351481
* [libcxxabi] Allow building with sanitizers enabledLouis Dionne2018-10-101-0/+1
| | | | | | | | | | | | | | | Summary: I copied the sanitizer-related logic in libcxx/lib/CMakeLists.txt. In the future, it would be great to avoid duplicating this logic in the compiler, libc++ and libc++abi. Reviewers: EricWF Subscribers: mgorny, christof, dexonsmith, libcxx-commits, davide Differential Revision: https://reviews.llvm.org/D53028 llvm-svn: 344191
* [libcxxabi] Fix test_exception_address_alignment test for ARMYvan Roux2018-08-161-1/+2
| | | | | | | | | | Check _LIBCXXABI_ARM_EHABI macro instead of libunwind version. Fixes PR34182 Differential revision: https://reviews.llvm.org/D50170 llvm-svn: 339865
* [itanium demangler] Support dot suffixes on block invocation functionsErik Pilkington2018-08-021-0/+2
| | | | | | rdar://32378759 llvm-svn: 338747
* [demangler] Support for reference collapsingErik Pilkington2018-07-271-0/+4
| | | | | | llvm.org/PR38323 llvm-svn: 338138
* Fix dangling reference in testEric Fiselier2018-07-251-1/+1
| | | | llvm-svn: 337906
* Add GCC 9 to XFAILs list for testEric Fiselier2018-07-221-1/+1
| | | | llvm-svn: 337662
* Fix libcxxabi tests after clang r334924Vitaly Buka2018-06-181-1/+1
| | | | llvm-svn: 334926
* Fix libcxx tests after clang r334677.Vitaly Buka2018-06-181-1/+2
| | | | llvm-svn: 334924
* private_typeinfo: limit is_dst_type_derived_from_static_type optimizationEric Fiselier2018-05-181-0/+51
| | | | | | | | | | | | | | | | Patch by Ryan Prichard If the destination type does not derive from the static type, we can skip the search_above_dst call, but we still need to run the !does_dst_type_point_to_our_static_type block of code. That block of code will increment info->number_to_dst_ptr to 2, and because dest isn't derived from static, the cast will ultimately fail. Fixes PR33439 Reviewed as https://reviews.llvm.org/D36447 llvm-svn: 332767
* private_typeinfo: propagate static flags in vmi search_above_dst methodEric Fiselier2018-05-181-0/+103
| | | | | | | | | | | | | | | This adds the test which was mistakenly not committed in r332763. Patch by Ryan Prichard Propagate the found_our_static_ptr and found_any_static_type flags from __vmi_class_type_info::search_above_dst to its caller. Fixes PR33425 and PR33487 Reviewed as https://reviews.llvm.org/D36446 llvm-svn: 332764
* Fix test failure for missing _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONSNico Weber2018-05-031-1/+4
| | | | | | | | | | This is a follow-up change to r331150. The CL moved the macro from individual file to build file, but the macro is missed in a test config file. https://reviews.llvm.org/D46385 Patch from Taiju Tsuiki <tzik@chromium.org>! llvm-svn: 331450
* Move _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS macro to build systemNico Weber2018-04-291-5/+0
| | | | | | | | | | | | | | | _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS is currently used to bring back std::unexpected, which is removed in C++17, but still needed for libc++abi for backward compatibility. This macro used to define in cxa_exception.cpp only, but actually needed for all sources that touches exceptions. So, a build-system-level macro is better fit to define this macro. https://reviews.llvm.org/D46056 Patch from Taiju Tsuiku <tzik@chromium.org>! llvm-svn: 331150
* [demangler] Support for fold expressions.Erik Pilkington2018-04-091-0/+6
| | | | llvm-svn: 329601
* [demangler] Support for <data-member-prefix>.Erik Pilkington2018-04-091-0/+3
| | | | llvm-svn: 329600
* [demangler] Support for partially substituted sizeof....Erik Pilkington2018-04-091-0/+2
| | | | llvm-svn: 329599
* [demangler] Use a back-patching scheme to resolve forward references.Erik Pilkington2018-03-251-2/+8
| | | | | | | | | | | | | | | Strictly in a conversion operator's type, a <template-param> refers to a <template-arg> that is further ahead in the mangled name. Instead of doing a second parse to resolve these, introduce a ForwardTemplateReference Node and back-patch the referenced <template-arg> when we're in the right context. This is also a correctness fix, previously we would only do a second parse if the <template-param> was out of bounds in the current set of <template-args>. This lead to misdemangles (gasp!) when the conversion operator was a member of a templated struct, for instance. llvm-svn: 328464
* [demangler] Tweak how parameter pack sizes are determined.Erik Pilkington2018-03-251-7/+10
| | | | | | | | Rather than eagerly propagating up parameter pack sizes in Node ctors, find the parameter pack size during printing. This is being done to support back-patching forward referencing <template-param>s. llvm-svn: 328463
OpenPOWER on IntegriCloud