summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2017-03-01[libcxxabi] Clean up macro usage.Ranjeet Singh
Convention in libcxxabi is to use !defined(FOO) not !FOO. Differential Revision: https://reviews.llvm.org/D30459 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@296612 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01[libc++abi] Clean up visibilityShoaib Meenai
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 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@296576 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01Fix non-reserved macro names LIBCXXABI_NORETURN and LIBCXXABI_ARM_EHABI.Eric Fiselier
This patch adds the required leading underscore to those macros. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@296567 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-05[libc++abi] Add _LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONSShoaib Meenai
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 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@288692 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-27[libc++abi] Default to DLL annotations on WindowsShoaib Meenai
`__declspec(dllexport)` and `__declspec(dllimport)` should only be used when building libc++abi as a DLL, but that's the more common use case, so default to adding the annotations and add an option to opt out. Similar to r282449, which made the corresponding change for libc++. Differential Revision: https://reviews.llvm.org/D24945 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@282470 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-26libc++abi: build with -fvisibility=hiddenSaleem Abdulrasool
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. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@270816 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-04ibc++abi: mark visibilitySaleem Abdulrasool
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. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@254691 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-04c++abi: whitespace adjustmentSaleem Abdulrasool
Cleanup some code with clang-format to make the following change easier to identify material difference. NFC. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@254690 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02Implement uncaught_exceptions() to get a count, rather than a bool. Update ↵Marshall Clow
the libc++abi version. Reviewed as http://reviews.llvm.org/D10067 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@238827 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-24libc++abi: remove the duplicated unwind contentSaleem Abdulrasool
The unwinder has been moved into its own project setup at http://svn.llvm.org/projects/libunwind/trunk. This simply removes the now duplicated content. This move was previously discussed on llvmdev at [1]. [1] http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-January/081507.html git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@235759 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-13unwind: always export unw_local_addr_spaceSaleem Abdulrasool
It seems that the remote unwinder is entirely unused at this moment. unw_local_addr_space was referencing sThisAddressSpace which use to be a static in global namespace. It has since then become a member variable of LocalAddressSpace. Update this definition and always export it (needed to implement unw_get_proc_info_by_ip for ARM). git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@229133 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-12unwind: move exported APIs out of headerSaleem Abdulrasool
Ideally, we would do something like inline __declspec(dllexport) to ensure that the symbol was inlined within libunwind as well as emitted into the final DSO. This simply moves the definition out of the header to ensure that the *public* interfaces are defined and exported into the final DSO. This change also has "gratuitous" code movement so that the EHABI and generic implementations are co-located making it easier to find them. The movement from the header has one minor change introduced into the code: additional tracing to mirror the behaviour of the non-EHABI interfaces. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@228903 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-05[libcxxabi] Fix -Werror build for 32-bit non-ARM.Dan Albert
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 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@228363 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-05Some more -Wundef issues.Dan Albert
This should be all of them for Linux. Might be some for the others. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@228267 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-05Enable -Wundef.Dan Albert
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. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@228257 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-04Whitespace cleanup.Dan Albert
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@228195 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-22Fix _Unwind_Backtrace for libc++abi built with libgcc.Logan Chien
Implement an undocumented _US_FORCE_UNWIND flag for force unwinding. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@226820 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-22Remove _Unwind_{Get,Set}{GR,IP} from ARM EHABI build.Logan Chien
This commit partially reverts r219629. This functions are not a part of ARM EHABI specification, and AFAIK, the de facto implementation does not export these functions. Without this change, any programs compiled with this unwind.h will be incompatible with other implementations due to linkage error. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@226818 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-20[libunwind] improve x86_64 comments in compact_unwind_encoding.hNick Kledzik
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@224657 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-20[libunwind] fix comment in compact_unwind_encoding.hNick Kledzik
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@224656 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-18[libcxxabi] Add __cxa_thread_atexit for TLS support on Linux.Dan Albert
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 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@224477 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-27Fix unicode chars into ascii in comment lines.NAKAMURA Takumi
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@220668 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-13Correctly export _Unwind_[GS]et(GR|IP) for EHABI.Dan Albert
These need to have normal linkage instead of being static inline as many libraries expect to be able to declare these and have the linker find them rather than needing to include the header. http://mentorembedded.github.io/cxx-abi/abi-eh.html Also clean up some warnings while I'm here. Reviewers: jroelofs, kledzik Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D5754 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@219629 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-11Adding ABI support for __cxa_throw_bad_array_new_length.Aaron Ballman
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@217604 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-29Make _Unwind_Backtrace() work on ARM.Dan Albert
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 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@216730 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-25Land support for ARM EHABI unwinding for libunwind.Nico Weber
This was written by: Albert Wong <ajwong@chromium.org> Antoine Labour <piman@chromium.org> Dana Jansen <danakj@chromium.org Jonathan Roelofs <jonathan@codesourcery.com> Nico Weber <thakis@chromium.org> git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@211743 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-25Start landing support for ARM EHABI unwinding.Nico Weber
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. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@211739 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-10Implement ARM EHABI exception handling.Logan Chien
This commit implements the ARM zero-cost exception handling support for libc++abi. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@208466 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-08Fixes more incorrect #ifs for SJ/LJ exceptionsJonathan Roelofs
Replaces several `#if __arm__` with `#if __USING_SJLJ_EXCEPTIONS__`. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@208352 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-24Remove unused/obsolete ARM64 constantsNick Kledzik
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@207064 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-23Fixes incorrect #ifs for SJ/LJ exceptionsDan Albert
The was working because, given __APPLE__, _LIBUNWIND_BUILD_SJLJ_APIS was set to __arm__, but other ARM targets not using SJ/LJ will fail to compile. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@206941 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-30[libunwind] remove stray conditionalNick Kledzik
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@200432 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18Add a first cut at a Registers_arm class, to be used for 32bit arm EHABI ↵Nico Weber
unwinding. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@197591 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-01Rename LIBUNWIND_AVAIL to LIBUNWIND_UNAVAIL so as to not conflict with other ↵Nick Kledzik
(different) LIBUNWIND_AVAIL define git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@193839 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-17unwinder: conditionalise availabilitySaleem Abdulrasool
__attribute__ (( unavailable )) is for Apple specific builds. Create a macro to conditionalise the usage of the macro. This is to aid in porting the unwinder to other platforms. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@192868 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-07libcxxabi contains the runtime support for C++. But, as some folks have Nick Kledzik
realized, it is not complete. It relies on some _Unwind_* functions to be supplied by the OS. That means it cannot be ported to platforms that don’t already have an unwinder. Years ago Apple wrote its own unwinder for MacOSX and iOS. To make libcxxabi complete, Apple has decided the source code for its unwinder can be contributed to the open source LLVM libcxxabi project, with a dual licensed under LLVM and MIT license. So, I’ve spent some time cleaning up the sources to make them conform with LLVM style and to conditionalize the sources in a way that should make it easier to port to other platforms. The sources are in a separate "Unwind" directory under "src" in libcxxabi. Background: Most architectures now use "zero cost" exceptions for C++. The zero cost means there are no extra instructions executed if no exceptions are thrown. But if an exception is thrown, the runtime must consult side tables and figure out how to restore registers and "unwind" from the current stack frame to the catch clause. That ability to modify the stack frames and cause the thread to resume in a catch clause with all registers restored properly is the main purpose of the unwinder. This unwinder has two levels of API. The high level APIs are the _Unwind_* functions which the cxa_* exception functions in libcxxabi require. The low level APIs are the unw_* functions which are an interface defined by the the old HP libunwind project (which shares no code with this unwinder). git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@192136 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-17Tweaks/cleanups provided by Matthew DempskyHoward Hinnant
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@184118 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10Add capability to demangle invocation functions for ObjC blocks.Howard Hinnant
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@179208 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-19I've moved __cxa_terminate_handler, __cxa_unexpected_handler and ↵Howard Hinnant
__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. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@153039 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-14Enable __arm__ on appleHoward Hinnant
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@152735 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-23I had originally made the handler function pointers a static internal ↵Howard Hinnant
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. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@151256 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-17Add (reluctantly) a namespace alias for __cxxabiv1.Howard Hinnant
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@150828 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-02Work on restricting symbol visibility.Howard Hinnant
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@149633 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-02Add version number to this library so we can recognize when we're using it.Howard Hinnant
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@149632 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-30Put throw() clauses back on these functions in cxxabi.h. This header must ↵Howard Hinnant
be C++03 compatible and these throw specs are consistent with the current cxxabi.h that Apple ships. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@149249 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-24By changing all of the throw() specs to noexcept I've been able to compile ↵Howard Hinnant
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. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@148880 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-21Added __cxa_increment_exception_refcount, ↵Howard Hinnant
__cxa_decrement_exception_refcount, __cxa_current_primary_exception, __cxa_rethrow_primary_exception git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@147106 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-15Fixed several bugs, implemented support for vector types, and cleaned out ↵Howard Hinnant
dead code. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@146677 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-08Silence some -Wall warnings pointed out by Marshall ClowHoward Hinnant
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@137047 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-02make cxxabi.h safe for C code to includeNick Kledzik
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@136682 91177308-0d34-0410-b5e6-96231b3b80d8