summaryrefslogtreecommitdiffstats
path: root/libcxxabi
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix PR25874 - Detect features required for cxa_thread_atexit_test.pass.cppEric Fiselier2017-03-044-0/+10
| | | | llvm-svn: 296940
* Turn on -Wunused-function and cleanup occurancesEric Fiselier2017-03-043-15/+14
| | | | llvm-svn: 296936
* Work around GCC linking errors within libc++abi due to missing new/delete ↵Eric Fiselier2017-03-021-1/+5
| | | | | | definitions llvm-svn: 296823
* [libc++abi] Add option to enable definitions for the new/delete overloads.Eric Fiselier2017-03-022-5/+10
| | | | | | | | | | | | | | | | | | | | Summary: Currently both libc++ and libc++abi provide definitions for operator new/delete. However I believe this is incorrect and that one or the other should offer them. This patch adds the CMake option `-DLIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS` which defaults to `OFF` unless otherwise specified. This means that by default only libc++ provides the new/delete definitions. Reviewers: mclow.lists, mehdi_amini, dexonsmith, beanz, jroelofs, danalbert, smeenai, rmaprath, mgorny Reviewed By: mehdi_amini Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D30517 llvm-svn: 296801
* [libc++abi] Update new/delete definitions to match libc++Eric Fiselier2017-03-021-71/+157
| | | | | | | | | | | | | | | | | | | | | Summary: Currently both libc++ and libc++abi provide definitions for new/delete. However libc++abi's definitions haven't been updated to include aligned new/delete or sized deallocation. I don't see any reason why libc++abi shouldn't provide these newer overloads. This patch copies libc++'s implementation of `new/delete` into libc++abi so that it's now up to date. After applying this patch I plan to fix a longstanding bug where both libc++ and libc++abi provide definitions for new/delete. Reviewers: mclow.lists, mehdi_amini, dexonsmith, danalbert, smeenai, rmaprath, jroelofs Reviewed By: mehdi_amini Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D30514 llvm-svn: 296787
* Cleanup new/delete definitionsEric Fiselier2017-03-013-67/+71
| | | | | | | | | | | | | | | | | | | | This patch cleans up how libc++abi handles the definitions for new/delete. It is in preperation for upcoming changes to fix how both libc++ and libc++abi handle new/delete. The primary changes in this patch are: * Move the definitions for bad_array_length and bad_new_array_length into stdlib_exception.cpp. This way stdlib_new_delete.cpp only contains new/delete. * Rename cxa_new_delete.cpp -> stdlib_new_delete.cpp for consistency with other files. * Add a FIXME regarding when stdlib_new_delete.cpp is actually compiled as part of the dylib. llvm-svn: 296715
* [libcxxabi] Clean up macro usage.Ranjeet Singh2017-03-019-40/+33
| | | | | | | | Convention in libcxxabi is to use !defined(FOO) not !FOO. Differential Revision: https://reviews.llvm.org/D30459 llvm-svn: 296612
* [libc++abi] Clean up visibilityShoaib Meenai2017-03-0116-99/+47
| | | | | | | | | | | | | | | | | Use the libc++abi visibility macros instead of pragmas or using visibility attributes directly. Clean up redundant attributes on definitions (where the declarations already have visibility attributes applied, from either libc++ or libc++abi headers). Introduce _LIBCXXABI_WEAK as a drive-by cleanup, which matches the semantics of _LIBCPP_WEAK. No functional change. Tested by building on Linux before and after this change and verifying that the list of exported symbols is identical. Differential Revision: https://reviews.llvm.org/D26949 llvm-svn: 296576
* Fix non-reserved macro names LIBCXXABI_NORETURN and LIBCXXABI_ARM_EHABI.Eric Fiselier2017-03-017-36/+36
| | | | | | This patch adds the required leading underscore to those macros. llvm-svn: 296567
* Attempt to fix arm-native libcxxabi tests for the no-exceptions variantAsiri Rathnayake2017-02-272-0/+2
| | | | | | | | These tests embed calls to exceptions-related symbols from the abi library, which are absent in the no-exceptions variant. The tests need to be marked as unsupported for the no-exceptions configuration. llvm-svn: 296344
* [libcxxabi] Fix condition typo in rL296136Ranjeet Singh2017-02-241-1/+1
| | | | | | | | | Made a mistake in the condition typo because LIBCXXABI_BAREMETAL is always defined, I should have been checking the contents to see if it's enabled. Differential Revision: https://reviews.llvm.org/D30343 llvm-svn: 296146
* [libcxxabi] Disable calls to fprintf for baremetal targets.Ranjeet Singh2017-02-241-0/+2
| | | | | | | | | | We've been having issues with using libcxxabi and libunwind for baremetal targets because fprintf is dependent on io functions, this patch disables calls to fprintf when building for baremetal in release mode. Differential Revision: https://reviews.llvm.org/D30339 llvm-svn: 296136
* [CMake][libcxxabi] Update the libc++ test module pathPetr Hosek2017-02-181-1/+1
| | | | | | | | | | The libcxx/test/libcxx Python package has been moved into libcxx/utils/libcxx in r294651, but libcxxabi's CMakeLists.txt still looks for the old path. Differential Revision: https://reviews.llvm.org/D30133 llvm-svn: 295540
* Fix test_exception_storage.pass.cpp in C++17 my re-enabling the unexpected ↵Eric Fiselier2017-02-171-0/+4
| | | | | | handlers llvm-svn: 295411
* Fix couple of test failures when using the LIBCXXABI_SILENT_TERMINATE mode.Asiri Rathnayake2017-02-151-1/+1
| | | | | | | | | | | | | When libcxxabi is built in LIBCXXABI_SILENT_TERMINATE mode, libcxx test suite reports two failures: std/depr/exception.unexpected/set.unexpected/get_unexpected.pass.cpp std/depr/exception.unexpected/set.unexpected/set_unexpected.pass.cpp This is because the default unexpected handler is set to std::abort instead of std::terminate which these tests expect. llvm-svn: 295175
* Fix path to libc++'s python test moduleEric Fiselier2017-02-091-1/+1
| | | | llvm-svn: 294671
* [libcxxabi][CMake] Support in-tree libunwind when building as part of runtimesPetr Hosek2017-02-092-2/+3
| | | | | | | | | | | When building as part of runtimes, there is no predefined order in which the runtimes are loaded, so the targets from other projects might not be available. We need to rely on HAVE_<name> variables instead in that case. Differential Revision: https://reviews.llvm.org/D29574 llvm-svn: 294552
* Add support for demangling C++11 thread_local variables. In clang, the ↵David Bozier2017-01-312-0/+26
| | | | | | grammar for mangling for these names are "<special-name> ::= TW <object name>" for wrapper variables or "<special-name> ::= TH <object name>" for initialization variables. llvm-svn: 293638
* Fix ASAN failure in cxa_demangleMehdi Amini2017-01-272-1/+3
| | | | | | Found with ASAN + libFuzzer by Kostya Serebryany <kcc@google.com> llvm-svn: 293330
* Fix chromium build (libcxxabi)Asiri Rathnayake2017-01-261-1/+13
| | | | | | Pull the dependency on pthread_mach_thread_np() back into libcxxabi. llvm-svn: 293166
* cxa_demangle: fix rvalue ref checkSaleem Abdulrasool2017-01-242-4/+4
| | | | | | | | | | | | When checking if the type is a r-value ref, we would not do a complete check. This would result in us treating a trailing parameter reference `&)` as a r-value ref, and improperly inject the cv qualifier on the type. We now correctly demangle the type `KFvRmE` as a constant function rather than a constant reference. Fixes PR31741! llvm-svn: 292973
* cxa_demangle: avoid butchering the last parameter typeSaleem Abdulrasool2017-01-242-2/+8
| | | | | | | | | | | Fix an off-by-one case which would destroy the final parameter in a CV-qualified function type with a reference. We still get the CV qualification incorrect, but at least we do not clobber the type name any longer. Partially fixes PR31741. llvm-svn: 292963
* Remove all usages of REQUIRES-ANY in the test suite.Eric Fiselier2017-01-244-4/+4
| | | | | | | | | Pending LIT changes are about to remove the REQUIRES-ANY keyword in place of supporting boolean && and || within "REQUIRES". This patch prepares libc++ for that change so that when applied the bots don't lose their mind. llvm-svn: 292906
* Fix catch_reference_nullptr.pass.cpp test for GCC.Eric Fiselier2017-01-201-7/+1
| | | | | | | | | | | | This test contained an implicit conversion from nullptr to bool. Clang warns about this but the test had supressed that warning. However GCC diagnoses the same code as an error and requires -fpermissive to accept it. This patch fixes both the warning and the error by explicitly converting the pointer to bool. llvm-svn: 292638
* Revert r286788Jonathan Roelofs2017-01-182-11/+4
| | | | | | | | | | | | | | | | The Itanium ABI [1] specifies that __cxa_demangle accept either: 1) symbol names, which start with "_Z" 2) type manglings, which do not start with "_Z" r286788 erroneously assumes that it should only handle symbols, so this patch reverts it and adds a counterexample to the testcase. 1: https://mentorembedded.github.io/cxx-abi/abi.html#demangler Reviewers: zygoloid, EricWF llvm-svn: 292418
* Mark the dynamic-exception tests as unsupported under C++17, since it has no ↵Marshall Clow2017-01-165-4/+4
| | | | | | dynamic-exception specs. Also, remove a FIXME workaround from the config that allowed these tests to work under C++17. This addresses PR#31621. llvm-svn: 292135
* [cmake] Handle missing LIBUNWIND_* directories gracefullyMichal Gorny2017-01-141-2/+6
| | | | | | | | | | | Add LIBUNWIND_* directories to include path only if they were actually found, in order to fix the CMake error. Both of the directories are usually unnecessary since libcxxabi uses only the common part of unwind.h that is supplied both by GCC and Clang. Differential Revision: https://reviews.llvm.org/D25314 llvm-svn: 292018
* Don't dump llvm-config --cmakedir output if command fails.Eric Fiselier2017-01-141-1/+2
| | | | | | | | This patch adjusts the out-of-tree CMake configuration so that the stderr output is ignored when an old llvm-config is found that doesn't support --cmakedir. llvm-svn: 291993
* [libc++abi] Add a silent terminate handler to libcxxabi.James Y Knight2017-01-133-2/+21
| | | | | | | | | | | | | | | | | | | | The current std::terminate_handler pulls in some string code, some I/O code, and more. Since it is automatically setup as the default, this means that any trivial binary linking against libcxxabi will get this extra bloat. This patch allows disabling it as a build-time option, if you want to avoid the extra bloat. Patch by Tom Rybka! Reviewers: EricWF Subscribers: danalbert, llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D28497 llvm-svn: 291946
* Bump version to 5.0.0svnHans Wennborg2017-01-121-1/+1
| | | | llvm-svn: 291829
* [cmake] Obtain LLVM_CMAKE_PATH from llvm-config if availableMichal Gorny2017-01-091-1/+12
| | | | | | | | Use the new --cmakedir option to obtain LLVM_CMAKE_PATH straight from llvm-config. Fallback to local reconstruction if llvm-config does not support this option. llvm-svn: 291506
* [libcxxabi] Cleanup and adapt for r291275. NFC.Asiri Rathnayake2017-01-094-45/+28
| | | | | | | | | | | + Now that libcxxabi shares the same threading API as libcxx, a whole chunk of code in src/config.h is made redundant (I missed this earlier). + r291275 split off the externalized-thread-api libcxx configuration from the external-thread-library libcxx configuration. libcxxabi should follow the same approach. llvm-svn: 291440
* [libcxxabi] Enable tests by default in standalone.Bryant Wong2017-01-081-0/+4
| | | | | | | | | Tests targets will now be enabled by default when building libcxxabi out of tree (unless turned off with LIBCXXABI_INCLUDE_TESTS=OFF). Differential Revision: https://reviews.llvm.org/D28450 llvm-svn: 291378
* [libcxxabi] Add flag to conditionally enable testsBryant Wong2017-01-071-1/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D28449 llvm-svn: 291367
* tweak definition to avoid GCC warningSaleem Abdulrasool2017-01-041-1/+3
| | | | | | | | Use an `extern "C" { }` block around the definition rather than doing the inline definition. This avoids a GCC warning about a declaration being extern and having a definition. NFC. llvm-svn: 290937
* [libcxxabi] Introduce an externally threaded libc++abi variant.Asiri Rathnayake2017-01-0313-153/+87
| | | | | | | | | | r281179 Introduced an externally threaded variant of the libc++ library. This patch adds support for a similar library variant for libc++abi. Differential revision: https://reviews.llvm.org/D27575 Reviewers: EricWF llvm-svn: 290888
* Update LICENSE.TXT to 2017Eric Fiselier2017-01-031-1/+1
| | | | llvm-svn: 290877
* Fix new/delete exception specifications to match libc++ after r290845Eric Fiselier2017-01-031-44/+13
| | | | llvm-svn: 290847
* clean up `-Wmisleading-indentation` warningSaleem Abdulrasool2016-12-311-2/+2
| | | | | | Clean up the misleading indentation warning from GCC 6. NFC llvm-svn: 290788
* add cxa_demangle_fuzzerKostya Serebryany2016-12-283-0/+27
| | | | | | | | | | | | | | | | | Summary: All easy-to-find bugs in cxa_demangle where fixed now (https://bugs.chromium.org/p/chromium/issues/detail?id=606626) except for one (https://llvm.org/bugs/show_bug.cgi?id=31031). Now I'd like to properly integrate this fuzzer with the source tree and then run the fuzzer continuously on https://github.com/google/oss-fuzz Reviewers: compnerd, mclow.lists, mehdi_amini Subscribers: cfe-commits, mgorny Differential Revision: https://reviews.llvm.org/D28133 llvm-svn: 290650
* Suppress unreachable code warning in unwind testsEric Fiselier2016-12-245-0/+20
| | | | llvm-svn: 290487
* Fix warnings in libc++abi testsEric Fiselier2016-12-2411-39/+42
| | | | llvm-svn: 290471
* [libc++abi] Mark failing test on Darwin as XFAILShoaib Meenai2016-12-131-0/+4
| | | | | | | | | | | | | The macOS thread-local variable finalizer routines do not handle the case where a termination function registers another termination function correctly, causing this test to fail. I've filed a radar for this; mark the test XFAIL in the meantime. See [1] for more details. [1] http://lists.llvm.org/pipermail/cfe-dev/2016-November/051376.html Differential Revision: https://reviews.llvm.org/D27434 llvm-svn: 289513
* Fix signed comparison warningEric Fiselier2016-12-111-2/+2
| | | | llvm-svn: 289365
* Workaround the removal of dynamic exception specifications in C++17Eric Fiselier2016-12-111-1/+5
| | | | llvm-svn: 289353
* [libc++abi] Add _LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONSShoaib Meenai2016-12-051-7/+14
| | | | | | | | | | | It's useful to be able to disable visibility annotations entirely; for example, if we're building libc++abi static to include in another library, and we don't want any libc++abi functions getting exported out of that library. This is a generalization of _LIBCXXABI_DISABLE_DLL_IMPORT_EXPORT. Differential Revision: https://reviews.llvm.org/D26950 llvm-svn: 288692
* Check for SD-6 feature test macro when determining which tests should beRichard Smith2016-12-023-12/+7
| | | | | | available, rather than #ifdef'ing away the relevant tests if it's unavailable. llvm-svn: 288543
* Fix up r288457 for compilers that don't support noexcept function types:Richard Smith2016-12-022-4/+8
| | | | | | | disable the test entirely for those cases. This is a quick patch, I'll look at a proper feature flag next. llvm-svn: 288539
* Update implementation of ABI support for throwing noexcept function pointersRichard Smith2016-12-025-81/+30
| | | | | | | and catching as non-noexcept to match the final design per discusson on cxx-abi-dev. llvm-svn: 288457
* __cxa_demangle: use default member initializationSaleem Abdulrasool2016-11-181-14/+7
| | | | | | | | Sink the Db initialization into the structure rather than out-of-line at the declaration size. This just makes it easier to see what initialization is being performed. NFC. llvm-svn: 287364
OpenPOWER on IntegriCloud