Commit Graph

26 Commits

Author SHA1 Message Date
Saleem Abdulrasool 12315edf03 ibc++abi: mark visibility
Mark functions and types with the appropriate visibility.  This is particularly
useful for environments which explicitly indicate origin of functions (Windows).
This aids in generating libc++abi as a DSO which exposes only the public
interfaces.

llvm-svn: 254691
2015-12-04 02:14:58 +00:00
Saleem Abdulrasool 242d67b687 c++abi: whitespace adjustment
Cleanup some code with clang-format to make the following change easier to
identify material difference.  NFC.

llvm-svn: 254690
2015-12-04 02:14:41 +00:00
Marshall Clow 604de5c256 Implement uncaught_exceptions() to get a count, rather than a bool. Update the libc++abi version. Reviewed as http://reviews.llvm.org/D10067
llvm-svn: 238827
2015-06-02 13:03:17 +00:00
Dan Albert f25c866ba6 [libcxxabi] Fix -Werror build for 32-bit non-ARM.
Summary:
The inclusion of Unwind-EHABI.h was insufficiently guarded
(LIBCXXABI_ARM_EHABI was beign checked without ever being defined).

Move the check into the header file itself, add the check to the
source file, and clean up the existing checks.

LIBCXXABI_ARM_EHABI didn't have a canonical defintion; it was
duplicated across cxxabi.h, libunwind.h, and unwind.h. Move the
definition into __cxxabi_config.h and clean up the old cruft (note: we
will have to ship this header).

There are also a few drive-by formatting/whitespace cleanups.

Reviewers: jroelofs, thakis, compnerd

Reviewed By: compnerd

Subscribers: compnerd, aemerson, cfe-commits

Differential Revision: http://reviews.llvm.org/D7419

llvm-svn: 228363
2015-02-05 23:55:15 +00:00
Dan Albert 3bd13ca4e1 Enable -Wundef.
The problem that caused the need for http://reviews.llvm.org/D7419 was
caused by testing the value of something that was undefined. This
should prevent that in the future.

llvm-svn: 228257
2015-02-05 01:33:15 +00:00
Dan Albert 39477c4c8b Whitespace cleanup.
llvm-svn: 228195
2015-02-04 21:23:20 +00:00
Dan Albert 12c0c8b67f [libcxxabi] Add __cxa_thread_atexit for TLS support on Linux.
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
2014-12-18 00:03:57 +00:00
Aaron Ballman eb7c1a6e50 Adding ABI support for __cxa_throw_bad_array_new_length.
llvm-svn: 217604
2014-09-11 17:26:43 +00:00
Nico Weber af5ca95730 Start landing support for ARM EHABI unwinding.
The new code will be behind a LIBCXXABI_ARM_EHABI define (so that platforms
that don't want it can continue using e.g. SJLJ). This commit mostly just
adds the LIBCXXABI_ARM_EHABI define.

llvm-svn: 211739
2014-06-25 22:49:13 +00:00
Logan Chien dc65ab4cef Implement ARM EHABI exception handling.
This commit implements the ARM zero-cost exception handling
support for libc++abi.

llvm-svn: 208466
2014-05-10 00:42:10 +00:00
Howard Hinnant 4ac72dd982 I've moved __cxa_terminate_handler, __cxa_unexpected_handler and __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
2012-03-19 16:20:34 +00:00
Howard Hinnant baae2be624 Enable __arm__ on apple
llvm-svn: 152735
2012-03-14 19:30:00 +00:00
Howard Hinnant 49f28b5a47 I had originally made the handler function pointers a static internal 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
2012-02-23 15:32:07 +00:00
Howard Hinnant 995fcc0d49 Add (reluctantly) a namespace alias for __cxxabiv1.
llvm-svn: 150828
2012-02-17 18:45:44 +00:00
Howard Hinnant 90ef25c05e Add version number to this library so we can recognize when we're using it.
llvm-svn: 149632
2012-02-02 20:47:05 +00:00
Howard Hinnant 5bbc597f1e Put throw() clauses back on these functions in cxxabi.h. This header must be C++03 compatible and these throw specs are consistent with the current cxxabi.h that Apple ships.
llvm-svn: 149249
2012-01-30 16:02:11 +00:00
Howard Hinnant abc770690a By changing all of the throw() specs to noexcept I've been able to compile and link all of the source files into a dylib. Prior to this substitution the changed functions were calling __cxa_call_unexpected which isn't implemented yet. However in none of these cases do we actaully want __cxa_call_unexpected to be called. Primative buildit script added.
llvm-svn: 148880
2012-01-24 23:42:30 +00:00
Howard Hinnant e04f51662c Added __cxa_increment_exception_refcount, __cxa_decrement_exception_refcount, __cxa_current_primary_exception, __cxa_rethrow_primary_exception
llvm-svn: 147106
2011-12-21 23:32:11 +00:00
Nick Kledzik 2dfc79b19e make cxxabi.h safe for C code to include
llvm-svn: 136682
2011-08-02 05:15:26 +00:00
Nick Kledzik 12a10bc046 make LIBCXXABI_NORETURN be the right attribute
llvm-svn: 136680
2011-08-02 05:01:17 +00:00
Marshall Clow 60fa2d232a Fixed struct/class mismatch for std::type_info and added NORETURN flags
llvm-svn: 135584
2011-07-20 14:27:46 +00:00
Howard Hinnant 575498b52f tabs to spaces
llvm-svn: 132729
2011-06-07 19:56:49 +00:00
Nick Lewycky 69e35a7f55 Add support for the ARM EABI variant of the __cxa_guard methods, controlled by
the LIBCXXABI_ARMEABI macro.

llvm-svn: 132723
2011-06-07 18:46:10 +00:00
Marshall Clow ad3dea06a9 Added __cxa_bad_cast and __cxa_bad_typeid and placeholder NORETURN macro
llvm-svn: 132524
2011-06-03 02:04:41 +00:00
Howard Hinnant 4a88971ac1 Introduce cxa_virtual.cpp and cxa_guard.cpp. Contributed by Nick Lewycky, Howard Hinnant and John McCall
llvm-svn: 132009
2011-05-24 22:01:16 +00:00
Howard Hinnant d3da57f99b initial import
llvm-svn: 130921
2011-05-05 15:27:28 +00:00