summaryrefslogtreecommitdiffstats
path: root/libcxxabi/src/cxa_handlers.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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-4/+1
| | | | | | https://reviews.llvm.org/D42242 llvm-svn: 344152
* [libc++abi] Replace __sync_* functions with __libcpp_atomic_* functions.Eli Friedman2018-04-161-17/+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] 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
* [libc++abi] Clean up visibilityShoaib Meenai2017-03-011-3/+1
| | | | | | | | | | | | | | | | | 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
* 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 a -fno-exceptions libc++abi libary variantAsiri Rathnayake2016-05-311-4/+4
| | | | | | | | | | | | | | | | | 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
* libc++abi: build with -fvisibility=hiddenSaleem Abdulrasool2016-05-261-2/+2
| | | | | | | | 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
* Declare __cxa_new_handler as extern "C", or it declares a new variableReid Kleckner2015-04-151-1/+1
| | | | | | | Reverts change from r219012 to fix ABI incompatibility. Let's not worry about the GCC warning here. llvm-svn: 235013
* Use __atomic_exchange_n instead of Clang's __sync_swapReid Kleckner2014-10-031-2/+2
| | | | | | | | | | | 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
* Make __cxa_new_handler un-mangledHoward Hinnant2012-04-281-1/+1
| | | | llvm-svn: 155763
* I would really like to write the handlers in terms of C++11 atomics. This ↵Howard Hinnant2012-03-191-3/+16
| | | | | | 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-4/+4
| | | | | | | | 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-17/+2
| | | | | | Apple Radar: 11053417 llvm-svn: 152785
* move default handlers to their own file so they can be overridden at build ↵Nick Kledzik2012-03-151-77/+7
| | | | | | time (dyld) llvm-svn: 152770
* Enable/silence -Wshadow.Howard Hinnant2012-03-081-3/+0
| | | | llvm-svn: 152325
* And the handlers should be extern C.Howard Hinnant2012-02-231-0/+5
| | | | llvm-svn: 151261
* I had originally made the handler function pointers a static internal ↵Howard Hinnant2012-02-231-9/+9
| | | | | | detail, not accessible to the outside world. I did this because they must be accessed in a thread-safe manner, and the library provides thread-safe getters and setters for these. However I am at least temporarily making them public and giving them the Apple-extension names. In the future these may disappear again, and I think that would probably be a good idea. llvm-svn: 151256
* Treat all exceptions except that the ones that this library throws as ↵Howard Hinnant2012-02-011-4/+6
| | | | | | foreign. Even other C++ exceptions. llvm-svn: 149518
* Have the default unexpected/terminate handler output *demangled* names for ↵Howard Hinnant2012-01-311-3/+10
| | | | | | the type of exception instead of the mangled name. llvm-svn: 149409
* Minor bug fix in __cxa_call_unexpected. Changed std::terminate to detect a ↵Howard Hinnant2012-01-311-0/+19
| | | | | | caught-but-unhandled exception, and choose the handler out of that if found. llvm-svn: 149329
* Add a descriptive name for a constant. Also I'm at least temporarily waging ↵Howard Hinnant2012-01-301-15/+25
| | | | | | war on throw specs, both old and new style. Except where we have already publicly exposed the throw spec, I'm getting rid of them. They may come back later. But they seem somewhat prone to cyclic dependencies here. The throw spec implies compiler generated code that this library has to jump to during stack unwinding. I'd like to minimize the possiblity that the code used to properly make that jump is itself creating such jumps. llvm-svn: 149251
* Remove dependence upon std::exception_ptr from the ↵Howard Hinnant2012-01-241-19/+36
| | | | | | default_terminate_handler. Recovered the equivalent functionality at a lower level. llvm-svn: 148830
* Reviewing cxa_exception.cpp and marking as implemented as I go. Not marking ↵Howard Hinnant2011-12-071-0/+1
| | | | | | as implemented on arm when I'm not sure about that platform. llvm-svn: 146072
* terminate, unexpected and new handlers. If terminating while an exception is ↵Howard Hinnant2011-12-061-0/+140
unwinding, an attempt is made to print out the what() string if the exception is derived from std::exception. __terminate(handler) and __unexpected(handler) helpers are present in anticipation of other parts of libc++abi needing to call these interfaces with custom handlers. llvm-svn: 145948
OpenPOWER on IntegriCloud