summaryrefslogtreecommitdiffstats
path: root/libcxxabi/test
Commit message (Collapse)AuthorAgeFilesLines
* [cmake/multilib] Teach libc++abi's CMake build to support multilibChandler Carruth2014-12-293-20/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | libdir suffixes like 'lib64' or 'lib32'. This support is currently very rhudimentary. We define a variable LIBCXXABI_LIBDIR_SUFFIX. In a standalone build of libc++abi this can be directly set as a cached variable to control the multilib suffix used. When building libc++abi within a larger LLVM build, it is hard wired to whatever LLVM libdir suffix has been selected. If this doesn't work for someone, just let me know. I'm happy to change it. Unfortunately, libc++abi's lit setup made this somewhat problematic to change. It was setting variables up in a way that caused the resulting build to not work with lit at all. To fix that, I've moved some variables around in the CMake build to more closely match where and how they are defined in the libc++ CMake build. This includes specifically defining a library root variable in the CMake build where the libdir suffix can be applied, and then using that rather than re-computing it from the object directory in the lit config. This is essentially new functionality for libc++abi so I don't expect it to have any impact for folks until they start setting these variables. However, I know libc++abi is built in a diverse set of environments so just let me know if this causes you any problems. llvm-svn: 224927
* [libcxxabi] Add __cxa_thread_atexit for TLS support on Linux.Dan Albert2014-12-182-0/+35
| | | | | | | | | | | | | | | | | | | | | Summary: Fixes PR21738. The implementation for this is handled by __cxa_thread_atexit_impl, which is supplied by libc. More information: https://sourceware.org/glibc/wiki/Destructor%20support%20for%20thread_local%20variables Reviewers: mclow.lists, EricWF, jroelofs Reviewed By: jroelofs Subscribers: majnemer, cfe-commits Differential Revision: http://reviews.llvm.org/D6708 llvm-svn: 224477
* Use the newer python syntax for exceptionsJustin Bogner2014-12-131-1/+1
| | | | | | | We've dropped support for python 2.5, so now we can use the forward compatible "except ... as" syntax. llvm-svn: 224182
* Fix comment on end of #endif to match #ifEric Fiselier2014-11-251-1/+1
| | | | llvm-svn: 222719
* Use lit.util.executeCommand instead of our own versionEric Fiselier2014-11-251-20/+2
| | | | llvm-svn: 222718
* [libcxxabi] Refactor building and testing libc++abi without threadsEric Fiselier2014-11-245-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds CMake support for building and testing libc++abi without threads. 1. Add `LIBCXXABI_ENABLE_THREADS` option to CMake. 2. Propagate `LIBCXXABI_ENABLE_THREADS` to lit via lit.site.cfg.in 3. Configure tests for `LIBCXXABI_ENABLE_THREADS=OFF Currently the test suite does not work when libc++abi is built without threads because that information does not propagate to the test suite. Reviewers: danalbert, mclow.lists, jroelofs Reviewed By: jroelofs Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6393 llvm-svn: 222702
* [libcxxabi] Refactor test timing logic and disable by default.Eric Fiselier2014-11-247-43/+69
| | | | | | | | | | | | | | | | | | Summary: When using LIT the timing output is entirely unused but introduces a dependency on `<chrono>`. When libc++ is built without a montonic clock this causes some of the tests to fail. This patch factors out all of the timing logic into `support/timer.hpp` and disables it by default. To enable the timing you must define `LIBCXXABI_TIME_TESTS`. Reviewers: mclow.lists, danalbert, jroelofs Reviewed By: jroelofs Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6391 llvm-svn: 222701
* Ensure llvm-sanitizer is found by the tests when using sanitizers.Eric Fiselier2014-11-211-6/+22
| | | | llvm-svn: 222496
* [libcxxabi] Cleanup memory in tests to placate ASAN.Eric Fiselier2014-11-213-12/+15
| | | | | | | | | | | | | | Summary: ASAN fires on these tests because they don't clean up their memory. Reviewers: danalbert, jroelofs, mclow.lists Reviewed By: jroelofs Subscribers: dblaikie, cfe-commits Differential Revision: http://reviews.llvm.org/D6281 llvm-svn: 222493
* Add support for LLVM_USE_SANITIZER=Thread to test suiteEric Fiselier2014-11-181-0/+3
| | | | llvm-svn: 222260
* Add -g -fno-omit-frame-pointer when compiling tests with sanitizersEric Fiselier2014-11-141-0/+1
| | | | llvm-svn: 222053
* Move ARM failure from FIXME to XFAILRenato Golin2014-11-071-5/+1
| | | | llvm-svn: 221515
* Add support for UNSUPPORTED tag to litEric Fiselier2014-11-061-1/+12
| | | | llvm-svn: 221460
* Disable backtrace libcxxabi test on ARMRenato Golin2014-11-051-0/+5
| | | | | | | | _Unwind_Backtrace is not clearly defined in EHABI and needs more testing. A bug was created with some initial investigation done http://llvm.org/PR21444. This test fails with both libunwind and libgcc_s. llvm-svn: 221348
* Change uses of `sys.platform == 'linux2' to `sys.platform.startswith('linux')Eric Fiselier2014-10-231-3/+3
| | | | | | | | Although the current method is valid up till python 3.3 (which is not supported) this seems to be a clearer way of checking for linux and moves the tests towards python 3 compatibility. llvm-svn: 220535
* Only link the tests against -ldl on linuxEric Fiselier2014-10-231-1/+1
| | | | llvm-svn: 220509
* [libcxxabi] Add support for running libc++abi tests with sanitizersEric Fiselier2014-10-232-0/+26
| | | | | | | | | | | | | | Summary: Add support for LLVM_USE_SANITIZER to the libc++abi tests. Currently, if libc++abi is configured with LLVM_USE_SANITIZER then none of the tests will pass. Reviewers: jroelofs, mclow.lists, danalbert Reviewed By: danalbert Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D5926 llvm-svn: 220464
* Adding ABI support for __cxa_throw_bad_array_new_length.Aaron Ballman2014-09-111-0/+38
| | | | llvm-svn: 217604
* s/LIBCXXABI_SINGLE_THREADED/LIBCXXABI_HAS_NO_THREADS/ for consistency with ↵Jonathan Roelofs2014-09-051-3/+3
| | | | | | | | | libcxx Also remove the audotedection part so that if you're crazy enough to want a single-threaded abi library, you'll say so explicitly in the build. llvm-svn: 217262
* Add missing include to a test case.Dan Albert2014-08-291-0/+1
| | | | | | | Some platforms get size_t defined transitively by another include, but Android does not. llvm-svn: 216738
* Make _Unwind_Backtrace() work on ARM.Dan Albert2014-08-291-0/+61
| | | | | | | | | | | | | | | | | | | | | | Summary: Since the personality functions do the actual unwinding on ARM, and will also stop unwinding when they encounter a handler, we invoke _Unwind_VRS_Interpret() directly form _Unwind_Backtrace(). To simplify, the logic for decoding an EHT is moved out of unwindOneFrame() and into its own function, decode_eht_entry(). Unlike unwindOneFrame(), which could only handle ARM's compact personality function entries (section 6.3) decode_eht_entry() can handle the generic entries (section 6.2). Reviewers: jroelofs Reviewed By: jroelofs Subscribers: piman, aemerson, cfe-commits Differential Revision: http://reviews.llvm.org/D5112 llvm-svn: 216730
* Add support for building and testing the unwinder.Dan Albert2014-07-113-1/+17
| | | | | | | Note: The unwinder currently only works on Darwin and on ARM Linux. Non-ARM Linux support is not yet implemented, and will fail to build. llvm-svn: 212824
* Add lit configs for libcxxabi tests.Dan Albert2014-07-103-0/+274
| | | | | | | | | | | | | | | This makes running libcxxabi tests on Linux _much_ easier. Adds a check-libcxxabi target to cmake. Also defaults to building a dynamic libc++abi. This is so that the default options still test the libc++abi that is being built. There are two problems with testing a static libc++abi. In the case of a standalone build, the tests will link the system's libc++, which might not have been built against our libc++abi. In the case of an in tree build, libc++ will prefer a dynamic libc++abi from the system over a static libc++abi from the output directory. llvm-svn: 212672
* Add test case for inherited exceptionsJonathan Roelofs2014-06-031-0/+165
| | | | | | Test case written by Dana Jansens. llvm-svn: 210129
* Add EH test case checking that handlers in noexcept functions can still unwindJonathan Roelofs2014-05-311-0/+34
| | | | llvm-svn: 209944
* Add EH test cases corresponding to C++ ABI # 15.3.3Jonathan Roelofs2014-05-311-0/+444
| | | | llvm-svn: 209943
* PR19091: Track whether we're demangling a function template specialization toRichard Smith2014-05-121-0/+2
| | | | | | | determine whether we get a mangling for a return type, rather than trying to figure it out based on whether the mangled name ended with a '>'. llvm-svn: 208611
* Implement ARM EHABI exception handling.Logan Chien2014-05-101-0/+8
| | | | | | | This commit implements the ARM zero-cost exception handling support for libc++abi. llvm-svn: 208466
* Check exception specification with __cplusplus.Logan Chien2014-05-101-1/+1
| | | | | | | | | To allow the compilation with gcc, we can't use the __has_feature(cxx_noexcept) to detect the default destructor exception specification, which is noexcept(true) by default in C++11. We should use __cplusplus >= 201103L instead. llvm-svn: 208465
* On single threaded systems, turn mutexes into nopsJonathan Roelofs2014-05-061-3/+13
| | | | | | http://reviews.llvm.org/D3386 llvm-svn: 208135
* Try harder to get the compiler to use float registers in differentJoerg Sonnenberger2014-05-041-8/+26
| | | | | | places to increase the chance of messing up any preserved registers. llvm-svn: 207938
* Don't use bash features.Joerg Sonnenberger2014-05-031-16/+16
| | | | llvm-svn: 207907
* Add unwind test case that checks restoring of float registers (such as on ↵Nick Kledzik2014-04-291-0/+239
| | | | | | AArch64) llvm-svn: 207481
* Demangle Dc to decltype(auto) as per the Itanium C++ ABI spec.Anders Carlsson2014-02-171-0/+1
| | | | llvm-svn: 201533
* Fix PR17221 - can't catch virtual base classes when throwing derived NULL ↵Marshall Clow2014-02-061-4/+39
| | | | | | pointers. Specifically, libc++abi would crash when you tried it. llvm-svn: 200904
* Fix PR17222 - catching derived classes from thrown null pointer. Adds tests, tooMarshall Clow2014-02-051-1/+76
| | | | llvm-svn: 200864
* Implement demangling for user-defined operators.Howard Hinnant2014-01-061-0/+1
| | | | llvm-svn: 198643
* Fix demangling crasher. The crasher involved nested <encoding> involving ↵Howard Hinnant2013-12-111-1/+4
| | | | | | parameter packs, which exposed a logic bug causing an empty vector<string> to be accessed with back(). In addition to fixing the bug, I've inserted numerous preemptive checks for similar bugs in the hopes that if another bug is uncovered, the bug results in an invalid mangled string instead of a demangler crash. Test suite updated with string that was causing the crash. llvm-svn: 197063
* 80-column wrap a comment in a testNico Weber2013-12-051-1/+1
| | | | llvm-svn: 196540
* Fixed a couple of test errors; changed 'const A const *' to 'const A* ↵Marshall Clow2013-12-041-2/+2
| | | | | | const'. Thanks to Nico for the catch llvm-svn: 196355
* tip-of-trunk clang has corrected some access checks for special members in a ↵Howard Hinnant2013-07-301-4/+4
| | | | | | virtual inheritance hierarchy. Change a few private inheritances to protected. This change will not impact what the test was testing. This fixes http://llvm.org/bugs/show_bug.cgi?id=16753. llvm-svn: 187429
* I'd no sooner made the last commit when Matthew Dempsky sent me another test ↵Howard Hinnant2013-06-231-1/+1
| | | | | | case that led me to yet another closely related test case that the current design could not handle. I've now changed the way forward references are handled completely. It wasn't that much code to change. The demangler, when confronted with a forward reference to a template parameter, now parses things twice. During the second parse, all forward references are remembered from the first parse. Test suite updated with new case. llvm-svn: 184672
* After a private conversation with Arthur O'Dwyer, and a good night's sleep, ↵Howard Hinnant2013-06-231-1/+1
| | | | | | I believe this fix is a better fix than what I committed in r184656 yesterday. I've basically moved the checking for '`' from the start of the demangling process to the end of it. In the process I discovered that one of the test cases no longer demangled to the expected string. After further investigation I believe this case to not be a valid mangled string, and so I moved the test case to the 'invalid cases'. The reason I believe it is invalid is that it should use T_ instead of T0_ to index the template parameter. llvm-svn: 184668
* Filter out '`' in mangled strings and reject them as invalid if found.Howard Hinnant2013-06-231-0/+1
| | | | llvm-svn: 184656
* I created a random mangled name generator and have thrown about 200 million ↵Howard Hinnant2013-06-211-0/+2
| | | | | | random strings at the demangler. I succeeded in crashing it twice more and those crashers have been fixed and the test suite updated with the crash cases. llvm-svn: 184562
* Another demangler crasher. Updated test suite to prevent regression.Howard Hinnant2013-06-201-0/+1
| | | | llvm-svn: 184477
* Protect against invalid mangled names. Add test suite for invalid mangled ↵Howard Hinnant2013-06-201-17/+14
| | | | | | names. llvm-svn: 184394
* Demangle objc mangling implemented in r184250Howard Hinnant2013-06-191-0/+2
| | | | llvm-svn: 184301
* Demangler update: This now demangles many more (all?) C++11 symbols. ↵Howard Hinnant2013-06-171-5/+17
| | | | | | Demangler tests updated. llvm-svn: 184097
* Add capability to demangle invocation functions for ObjC blocks.Howard Hinnant2013-04-101-0/+1
| | | | llvm-svn: 179208
OpenPOWER on IntegriCloud