summaryrefslogtreecommitdiffstats
path: root/libcxxabi/src/cxa_default_handlers.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [libc++abi] Fix non-constant initialization of default terminateEric Fiselier2019-12-111-6/+8
| | | | handlers.
* [NFC][libc++abi] Convert stray tabs to spacesLouis Dionne2019-10-021-1/+1
| | | | llvm-svn: 373524
* [libc++abi] Remove uses of C++ headers when possibleLouis Dionne2019-10-011-4/+2
| | | | | | | | | | This reduces the (circular) dependency of libc++abi on a C++ standard library. Outside of the demangler which uses fancier C++ features, the only C++ headers now required by libc++abi are pretty much <new> and <exception>, and that's because libc++abi defines some types that are declared in those headers. llvm-svn: 373381
* libcxxabi: Rename .hpp files to .hNico Weber2019-08-121-2/+2
| | | | | | | | LLVM uses .h as its extension for header files. Differential Revision: https://reviews.llvm.org/D65981 llvm-svn: 368604
* [libcxxabi] Don't process exceptions in cxa_handlers when they're disabledPetr Hosek2019-07-121-0/+2
| | | | | | | | | | | When exceptions are disabled, avoid their processing altogether. This avoids pulling in the depenency on demangler significantly reducing binary size when statically linking against libc++abi built without exception support. Differential Revision: https://reviews.llvm.org/D64191 llvm-svn: 365944
* Update more file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | | 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
* Make libc++abi work better with gcc's ARM unwind library. Reviewed as ↵Marshall Clow2018-10-101-5/+2
| | | | | | https://reviews.llvm.org/D42242 llvm-svn: 344152
* [libc++abi] Replace __sync_* functions with __libcpp_atomic_* functions.Eli Friedman2018-04-161-12/+5
| | | | | | | | | | | This is basically part 2 of r313694. It's a little unfortunate that I had to copy-paste atomic_support.h, but I don't really see any alternative. The refstring.h changes are the same as the libcxx changes in r313694. llvm-svn: 330162
* [libc++abi] Fix unused function when building with LIBCXXABI_SILENT_TERMINATEPeter Collingbourne2018-01-251-1/+1
| | | | | | | | | | | This fixes: src/cxa_default_handlers.cpp:25:13: error: unused function 'demangling_terminate_handler' [-Werror,-Wunused-function] Patch by Thomas Anderson! Differential Revision: https://reviews.llvm.org/D42399 llvm-svn: 323397
* [libc++abi] Delete config.hShoaib Meenai2017-03-301-1/+0
| | | | | | | | | | | | Summary: It's now completely empty, so we can remove it entirely. Reviewers: mclow.lists, EricWF Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D31502 llvm-svn: 299129
* [libcxxabi] Clean up macro usage.Ranjeet Singh2017-03-011-1/+1
| | | | | | | | Convention in libcxxabi is to use !defined(FOO) not !FOO. Differential Revision: https://reviews.llvm.org/D30459 llvm-svn: 296612
* 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
* [libc++abi] Add a silent terminate handler to libcxxabi.James Y Knight2017-01-131-2/+10
| | | | | | | | | | | | | | | | | | | | 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
* libc++abi: build with -fvisibility=hiddenSaleem Abdulrasool2016-05-261-1/+4
| | | | | | | | Enable building libc++abi with hidden visibility by default. The ABI mandated interfaces (and a few extra) are already set up to be externally visible. This allows us to ensure that any implementation details are not leaked. llvm-svn: 270816
* Use __atomic_exchange_n instead of Clang's __sync_swapReid Kleckner2014-10-031-6/+8
| | | | | | | | | | | Also remove an extra extern "C" from a global variable redeclaration. This allows building libcxxabi with GCC on my system. Reviewers: majnemer Differential Revision: http://reviews.llvm.org/D5604 llvm-svn: 219012
* Minor libc++abi changes to make things build better with gcc.Nico Weber2014-06-251-0/+1
| | | | llvm-svn: 211748
* Partially revert r152770. That commit moved the default handlers to their ↵Howard Hinnant2013-02-061-9/+5
| | | | | | own file. But it also did some refactoring. It is the latter that is being reverted. The refactoring had accidentally removed the required effect that the default unexpected_handler calls std::terminate(), which is a visible effect. llvm-svn: 174532
* Changed 'cause' from 'terminate' to 'uncaught' in default_terminate_handlerHoward Hinnant2012-04-241-1/+1
| | | | llvm-svn: 155452
* I would really like to write the handlers in terms of C++11 atomics. This ↵Howard Hinnant2012-03-191-1/+9
| | | | | | would give us the best performance, portablity, and safety tradeoff. Unfortunately I can not yet do that. So I've put the desired code in comments, and reverted the handler getters to the slower but safer legacy atomic intrinsics. llvm-svn: 153041
* I've moved __cxa_terminate_handler, __cxa_unexpected_handler and ↵Howard Hinnant2012-03-191-7/+6
| | | | | | __cxa_new_handler from the public header cxxabi.h into the private header cxa_handlers.hpp. During this move I've also moved them from namespace __cxxabiapple into the global namespace. They are, and have always been extern C and so the namespace (or lack of it) does not affect their ABI. In general external clients should not reference these symbols. They are atomic variables and will be changing into C++11 atomic variables in the future. However for those few clients who really need access to them, their name, mangling, size, alignment and layout will remain stable. You just may need your own declaration of them. Include guards have been added to the private header cxa_exception.hpp. The private header cxa_default_handlers.hpp has been removed and the default handlers are now file-static. Include guards have been added to the private header cxa_handlers.hpp. llvm-svn: 153039
* Less lame "concurrency" supportDave Zarzycki2012-03-151-2/+2
| | | | | | | | These APIs aren't thread safe, but they're pretending to be. Let's at least make the getter as fast as they can be. The setters are a lost cause unless the API can be fixed. llvm-svn: 152786
* Be friendly to when dead_strip doesn't workDave Zarzycki2012-03-151-2/+21
| | | | | | Apple Radar: 11053417 llvm-svn: 152785
* move default handlers to their own file so they can be overridden at build ↵Nick Kledzik2012-03-151-0/+98
time (dyld) llvm-svn: 152770
OpenPOWER on IntegriCloud