summaryrefslogtreecommitdiffstats
path: root/libcxxabi/test
Commit message (Collapse)AuthorAgeFilesLines
* [lit] Replace print with lit_config.note().Logan Chien2016-09-021-1/+1
| | | | | | | This commit replaces print statement with lit_config.note(). This fixes python3 support for check-libcxxabi. llvm-svn: 280484
* [CMake] Be more consistent about naming targets and components in libc++abiEric Fiselier2016-08-281-1/+4
| | | | | | | | | | | | | | | | | | This patch (and commit summary) mirror r279675 by Chris B which was applied to libc++ but not libc++abi. Summary: The point of this patch is to have a consistent convention for naming build, check and install targets so that the targets can be constructed from the project name. This change renames a bunch of CMake components and targets from libcxxabi to cxxabi. For each renamed target I've added a convenience target that matches the old target name and depends on the new target. This will preserve function of the old targets so that the change doesn't break the world. We can evaluate if it is worth removing the extra targets later. llvm-svn: 279938
* [CMake] Apply r279151 cleanup to libc++abi.Eric Fiselier2016-08-281-1/+2
| | | | | | | | | | | | This patch applies changes similar to those in r279515 to libc++abi. Summary of changes in this patch: * Renamed variable LLVM_CONFIG -> LLVM_CONFIG_PATH * Renamed variable LIBCXXABI_BUILT_STANDALONE -> LIBCXXABI_STANDALONE_BUILD * Add an include of AddLLVM in the tests subdirectory for add_lit_testsuite. llvm-svn: 279936
* test: fix test under ASAN and MSANSaleem Abdulrasool2016-08-281-0/+4
| | | | | | | | | | | | When we're running tests under ASAN or MSAN, they're compiled with -O1, which enables tail call elimination. This causes backtrace_test to fail: the compiler performs tail call elimination for call3_nothrow, but it can't for call3_throw, leading to a mismatched frame count. Disable tail call elimination (and inlining, just to be explicit) to avoid this. Patch by Shoaib Meenai! llvm-svn: 279935
* Fix ASAN failures in the demanglerMehdi Amini2016-08-131-0/+16
| | | | | | These were found fuzzing with ASAN. llvm-svn: 278579
* Do not depend on unwind when building standalonePetr Hosek2016-08-081-4/+3
| | | | | | | | | | When libcxxabi is being built standalone, unwind dependency is not available, so do not use it even when LLVM unwinder is being requested. Differential Revision: https://reviews.llvm.org/D23228 llvm-svn: 278058
* Attempt to bring peace to -Werror buildbots.Richard Smith2016-07-191-0/+6
| | | | llvm-svn: 276022
* [libcxxabi] When catching an exception of type nullptr_t with a handler ofRichard Smith2016-07-195-22/+101
| | | | | | | | | | | | | pointer-to-member type, produce a null value of the right type. This fixes a bug where throwing an exception of type nullptr_t and catching it as a pointer-to-member would not guarantee to produce a null value in the catch handler. The fix is pretty simple: we statically allocate a constant null pointer-to-data-member representation and a constant null pointer-to-member-function representation, and produce the address of the relevant value as the adjusted pointer for the exception. llvm-svn: 276016
* Fix [libcxxabi] Fix warning about uninitialized const member.Eric Fiselier2016-06-151-1/+2
| | | | llvm-svn: 272824
* Fix warning about uninitialized const member. NFCEric Fiselier2016-06-151-0/+1
| | | | llvm-svn: 272823
* [libcxxabi] Reorder base class initializers in libc++abi tests to prevent ↵Eric Fiselier2016-06-152-4/+4
| | | | | | | | | | | | | | | | | | | -Wreorder Summary: This patch fixes -Wreorder warnings on test classes with virtual bases. Since the compiler is performing the reordering anyway this change *should* have NFC. However the test notes that it is checking that "virtual base classes work properly". Since initialization order is clearly part of correctness I want to confirm that this wasn't an intentional mistake. Reviewers: mclow.lists, howard.hinnant Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D21396 llvm-svn: 272821
* Suppress warnings about the operations currently under test.Eric Fiselier2016-06-158-0/+54
| | | | llvm-svn: 272819
* [libcxxabi] Allow target flags to affect configuration tests.Eric Fiselier2016-06-022-2/+2
| | | | | | | | | | | | | | | | | | | | | Summary: This patch changes the libc++abi CMake so that it adds certain target flags like '-m32' or '--gcc-toolchain' before including `config-ix.cmake`. Since these flags can affect things like `check_library_exists([...])` they needed to be added before the tests are performed. Additionally this patch adds `LIBCXXABI_BUILD_32_BITS` which defaults to `LLVM_BUILD_32_BITS`. This patch fixes: https://llvm.org/bugs/show_bug.cgi?id=27950 https://llvm.org/bugs/show_bug.cgi?id=27959 Reviewers: danalbert, jroelofs, bcraig, compnerd, EricWF Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D20886 llvm-svn: 271470
* [libcxxabi][test] Add missing return statement.Asiri Rathnayake2016-06-011-1/+1
| | | | | | | | This causes a test failure when running with -Werror=return-type. NFC. llvm-svn: 271423
* [libcxxabi] Introduce a -fno-exceptions libc++abi libary variantAsiri Rathnayake2016-05-3143-6/+342
| | | | | | | | | | | | | | | | | Currently there is only support for a -fno-exceptions libc++ build. This is problematic for functions such as std::terminate() which are defined in libc++abi and using any of those functions throws away most of the benefits of using -fno-exceptions (code-size). This patch introduces a -fno-exceptions libc++abi build to address this issue. This new variant of libc++abi cannot be linked against any with-exceptions code as some symbols necessary for handling exceptions are missing in this library. Differential revision: http://reviews.llvm.org/D20677 Reviewers: EricWF, mclow.lists, bcraig llvm-svn: 271267
* Enable testing for static libc++abiBen Craig2016-04-193-11/+13
| | | | | | | | | | | | | This change leverages framework changes made in libcxx. See those changes for more details. (http://reviews.llvm.org/D16544) Some Mac specific logic for testing against libc++abi had to be moved from libcxxabi's config.py, as it was overriding choices made in libcxx's config.py. That logic is now in libcxx's target_info.py. http://reviews.llvm.org/D16545 llvm-svn: 266729
* [libcxxabi] Disable cxa_thread_atexit_test if unavailableJonas Hahnfeld2016-03-174-0/+8
| | | | | | | | | The feature check is already in place when building the library but wasn't honored for the tests. Differential Revision: http://reviews.llvm.org/D18205 llvm-svn: 263699
* Reducing stack usage of testBen Craig2016-03-041-36/+36
| | | | | | | | This test has a lot of classes with large amounts of manually inserted padding in them, presumably to prevent various optimizations. The test then creates lots of these objects on the stack. On embedded targets, this was usually enough to overflow the stack. I moved the objects to global / namespace scope. Since the tests are each in their own namespace, there should be no cross-test conflicts. llvm-svn: 262717
* [libcxxabi] Make test tolerant of uncommon floating literal demanglingsBen Craig2016-01-201-5/+62
| | | | | | | | | | | | | | | libcxxabi uses the C99 library's %a format specifier to turn a floating point value into a hexadecimal string representation. The %a format specifier is rather loosely defined in the C spec though, and some C libraries emit a different (but valid) string for a given floating point value. In particular, the C spec only requires that there is a single, non-zero hexadecimal digit on the left of the decimal point. Given that constraint, there are typically four different valid representations of a floating point number. I have updated the test to accept any of the valid representations for demangled floating point literals. llvm-svn: 258311
* Mark some tests as XFAIL with GCC due to compiler bugsEric Fiselier2016-01-203-0/+12
| | | | llvm-svn: 258284
* Fix link flags order in RUN command.Eric Fiselier2016-01-201-1/+1
| | | | llvm-svn: 258277
* Recommit r256322: Fix PR25898 - Check for incomplete pointers types in ↵Eric Fiselier2016-01-191-0/+172
| | | | | | | | | | | can_catch(...) This patch re-commits r256322 and r256323. They were reverted due to a OS X test failure. The test failure has been fixed by libc++ commit r258217. This patch also adds some additional tests. llvm-svn: 258249
* Add missing license headersEric Fiselier2016-01-192-1/+18
| | | | llvm-svn: 258201
* Revert r256322 (and follow-up 256323), the test it added does not pass on OS X.Nico Weber2016-01-151-162/+0
| | | | llvm-svn: 257896
* Add new tests for throwing incomplete pointer typesEric Fiselier2015-12-231-18/+97
| | | | llvm-svn: 256323
* Fix PR25898 - Check for incomplete pointers types in can_catch(...)Eric Fiselier2015-12-231-0/+83
| | | | llvm-svn: 256322
* Fix LIBCXXABI_HAS_NO_THREADS configuration.Eric Fiselier2015-10-141-8/+4
| | | | llvm-svn: 250316
* Configure for config site headerEric Fiselier2015-10-141-0/+1
| | | | llvm-svn: 250313
* Add config.project_obj_root to the libc++abi testsuiteEric Fiselier2015-10-141-0/+1
| | | | llvm-svn: 250307
* Fix Bug 25103 - _cxa_demangle improperly demangles virtual thunks. Thanks to ↵Marshall Clow2015-10-121-0/+2
| | | | | | Jason King for the report and suggested fix llvm-svn: 250097
* Fix incorrect parsing of arguments for nested functions. Reviewed as ↵Marshall Clow2015-10-081-0/+1
| | | | | | http://reviews.llvm.org/D13192. Thanks to Anseny Kapoulkine for the patch. llvm-svn: 249649
* Convert LIBCXXABI_BUILD_32_BITS to LLVM_BUILD_32_BITS.Eric Fiselier2015-09-012-2/+2
| | | | llvm-svn: 246516
* Fix or disable C++11 tests in C++03 modeEric Fiselier2015-08-204-22/+14
| | | | llvm-svn: 245531
* Revert r243752, it broke running tests on OS X (PR24491).Nico Weber2015-08-181-5/+0
| | | | llvm-svn: 245325
* [libc++abi] Allow use just compiled clang++ for testsRenato Golin2015-07-311-0/+5
| | | | | | | | | | | Currently, the tests assume the system compiler is the one we want to test, but if we build libcxxabi together with LLVM+Clang, it'll get the wrong compiler. This patch allows us to test if we have clang++ in our /bin directory, and if so, use it. llvm-svn: 243752
* [libcxxabi] Add -funwind-tables to the test compilation options.Daniel Sanders2015-07-271-0/+1
| | | | | | | | | | | | | | | | | | Summary: backtrace_test.pass.cpp depends on unwind tables. These are generated by -funwind-tables which is the default for x86 but not for other targets. Thanks to Nitesh Jain for helping to narrow this down. Fixes PR24148 Reviewers: jroelofs Subscribers: cfe-commits, jroelofs, llvm-commits, hans Differential Revision: http://reviews.llvm.org/D11529 llvm-svn: 243296
* Implement uncaught_exceptions() to get a count, rather than a bool. Update ↵Marshall Clow2015-06-021-0/+36
| | | | | | the libc++abi version. Reviewed as http://reviews.llvm.org/D10067 llvm-svn: 238827
* Disallow conversions from function pointers to void*.Eric Fiselier2015-05-011-0/+16
| | | | | | | | | Function pointers and member function pointers cannot be converted to void*. libc++abi incorrectly allows this conversion for function pointers. Review URL: http://reviews.llvm.org/D8811 llvm-svn: 236299
* libc++abi: move tests backSaleem Abdulrasool2015-04-246-0/+771
| | | | | | | These are apparently related to libc++'s unwind personality handler and not unwind core. Move them back to the correct location. llvm-svn: 235765
* libc++abi: remove the duplicated unwind contentSaleem Abdulrasool2015-04-246-771/+0
| | | | | | | | | | The unwinder has been moved into its own project setup at http://svn.llvm.org/projects/libunwind/trunk. This simply removes the now duplicated content. This move was previously discussed on llvmdev at [1]. [1] http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-January/081507.html llvm-svn: 235759
* [libcxxabi] Disallow Base to Derived conversions for catching pointers to ↵Eric Fiselier2015-04-063-12/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | members. Summary: I accidentally implemented the 4.11 [conv.mem] conversions for libc++abi in a recent patch. @majnemer pointed out that 5.13 [except.handle] only allows the pointer conversions in 4.10 and not those is 4.11. This patch no longer allows the following example code: ```c++ struct A {}; struct B : public A {}; int main() { try { throw (int A::*)0; } catch (int B::*) { // exception caught here. } } ``` Reviewers: mclow.lists, jroelofs, majnemer Reviewed By: majnemer Subscribers: majnemer, cfe-commits Differential Revision: http://reviews.llvm.org/D8845 llvm-svn: 234254
* [libcxxabi] Fix multi-level pointer conversions and pointer to member ↵Eric Fiselier2015-04-023-4/+297
| | | | | | | | | | | | | | | | | | | | | | | | | | | conversion detection. Summary: Currently there are bugs in out detection of multi-level pointer conversions and pointer to member conversions. This patch fixes the following issues. * Allow multi-level pointers with different nested qualifiers. * Allow multi-level mixed pointers to objects and pointers to members with different nested qualifiers. * Allow conversions from `int Base::*` to `int Derived::*` but only for non-nested pointers. There is still some work that needs to be done to clean this patch up but I want to get some input on it. Open questions: * Does `__pointer_to_member_type_info::can_catch(...)` need to adjust the pointer if a base to derived conversion is performed? Reviewers: danalbert, compnerd, mclow.lists Reviewed By: mclow.lists Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D8758 llvm-svn: 233984
* Let libc++'s LIT configuration setup our linker paths and env.Eric Fiselier2015-03-172-18/+2
| | | | llvm-svn: 232529
* add option to tell LIT where to find the libc++ library when built out of treeEric Fiselier2015-03-172-2/+8
| | | | llvm-svn: 232518
* [libcxxabi] Build both static and shared versions of libc++abi by default.Eric Fiselier2015-03-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | Summary: This patch builds both static and shared versions of libc++abi by default. It adds/repurposes the following cmake options: * `LIBCXXABI_ENABLE_SHARED`: Enable/disable building the shared library. (Previously using `OFF` would build the static library instead) * `LIBCXXABI_ENABLE_STATIC`: Enable/disable building the static library. This patch also re-purposes the CMake target `cxxabi` to be a meta-target for `cxxabi_shared` and `cxxabi_static`. This could potentially break other builds that depend on `cxxabi` being a library target. We will need to apply a patch to libc++'s CMake before committing this change. Running the tests is still only supported when the shared version is built. Support for running the tests against the static library will come in another patch. Reviewers: jroelofs, mclow.lists, danalbert, compnerd Reviewed By: danalbert, compnerd Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D8013 llvm-svn: 231075
* Add remote testing support to the lit configJonathan Roelofs2015-02-262-0/+6
| | | | | | | Now that the corresponding support in libcxx has landed (r230592), adding support here is pretty simple. llvm-svn: 230643
* Add temporary workaround for missing symbol __cxa_throw_bad_new_array_length ↵Eric Fiselier2015-02-211-0/+9
| | | | | | on OS X. llvm-svn: 230125
* Fix libcxxabi's library and object root for tests.Eric Fiselier2015-02-113-9/+14
| | | | llvm-svn: 228779
* Make test require 'linux' instead of 'linux2'Eric Fiselier2015-02-031-1/+1
| | | | llvm-svn: 228073
* [libcxxabi] Teach CMake better ways to find the libc++ source directory (and ↵Eric Fiselier2015-01-223-46/+36
| | | | | | | | | | | | | | | | | | | | | | misc cleanup). Summary: The main section of this patch teaches CMake a new option `LIBCXXABI_LIBCXX_PATH` that specifies the path to the libcxx source root. This information is passed to lit so that it can better find libc++'s python module. `LIBCXXABI_LIBCXX_PATH` is also used to help find the libc++ headers. The rest of this patch is misc cleanup, mostly to make pep8 and pylint happy. I've also copied libc++'s .gitignore into libc++abi. Reviewers: jroelofs, danalbert Reviewed By: danalbert Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D7130 llvm-svn: 226855
OpenPOWER on IntegriCloud