summaryrefslogtreecommitdiffstats
path: root/libcxxabi/include
Commit message (Collapse)AuthorAgeFilesLines
* [libc++] Update link to Itanium C++ ABI documentationLouis Dionne2019-10-011-1/+1
| | | | llvm-svn: 373372
* [libcxxabi] Define _LIBCXXABI_GUARD_ABI_ARM on WebAssemblySam Clegg2019-08-141-1/+2
| | | | | | | | | | This matches ItaniumCXXABI.cpp. Fixes PR42680 Differential Revision: https://reviews.llvm.org/D64961 llvm-svn: 368783
* Fix PR41465 - Use __builtin_mul_overflow instead of hand-rolled check.Eric Fiselier2019-04-111-0/+2
| | | | | | | | | On ARM the hand-rolled check causes a call to __aeabi_uidiv, which we may not have a definition for. Using the builtin avoids the generation of any library call. llvm-svn: 358195
* [libc++abi] Create a macro for the 32 bit guard setting on ARM platformsLouis Dionne2019-04-102-1/+5
| | | | | | | | | | | | | | | | Summary: The goal is to use a descriptive name for this feature, instead of just using __arm__. Reviewers: EricWF Subscribers: javed.absar, kristof.beyls, christof, jkorous, dexonsmith, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D60520 llvm-svn: 358106
* Update more file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-192-8/+6
| | | | | | | | | | | | | | | | | | 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
* [libc++abi] Provide __cxa_thread_atexit on FuchsiaPetr Hosek2018-10-291-2/+2
| | | | | | | | Fuchsia already supports this interface. Differential Revision: https://reviews.llvm.org/D53801 llvm-svn: 345534
* [CFI] Disable CFI checks for __cxa_decrement_exception_refcountVlad Tsyrklevich2018-04-091-0/+10
| | | | | | | | | | | | | | | | | Summary: exception_header->exceptionDestructor is a void(*)(void*) function pointer; however, it can point to destructors like std:: exception::~exception that don't match that type signature. Reviewers: pcc, vitalybuka Reviewed By: vitalybuka Subscribers: kcc, christof, cfe-commits Differential Revision: https://reviews.llvm.org/D45455 llvm-svn: 329629
* [libcxxabi] Clean up macro usage.Ranjeet Singh2017-03-012-4/+2
| | | | | | | | 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-011-0/+6
| | | | | | | | | | | | | | | | | 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-012-11/+11
| | | | | | This patch adds the required leading underscore to those macros. llvm-svn: 296567
* [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
* [libc++abi] Default to DLL annotations on WindowsShoaib Meenai2016-09-271-2/+7
| | | | | | | | | | | | `__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 llvm-svn: 282470
* libc++abi: build with -fvisibility=hiddenSaleem Abdulrasool2016-05-261-0/+3
| | | | | | | | 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
* ibc++abi: mark visibilitySaleem Abdulrasool2015-12-042-73/+120
| | | | | | | | | 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
* c++abi: whitespace adjustmentSaleem Abdulrasool2015-12-042-93/+66
| | | | | | | Cleanup some code with clang-format to make the following change easier to identify material difference. NFC. llvm-svn: 254690
* Implement uncaught_exceptions() to get a count, rather than a bool. Update ↵Marshall Clow2015-06-021-3/+4
| | | | | | the libc++abi version. Reviewed as http://reviews.llvm.org/D10067 llvm-svn: 238827
* libc++abi: remove the duplicated unwind contentSaleem Abdulrasool2015-04-243-1307/+0
| | | | | | | | | | 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 llvm-svn: 235759
* unwind: always export unw_local_addr_spaceSaleem Abdulrasool2015-02-131-1/+2
| | | | | | | | | | 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). llvm-svn: 229133
* unwind: move exported APIs out of headerSaleem Abdulrasool2015-02-121-25/+1
| | | | | | | | | | | | | | | 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. llvm-svn: 228903
* [libcxxabi] Fix -Werror build for 32-bit non-ARM.Dan Albert2015-02-054-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Some more -Wundef issues.Dan Albert2015-02-051-1/+1
| | | | | | This should be all of them for Linux. Might be some for the others. llvm-svn: 228267
* Enable -Wundef.Dan Albert2015-02-053-10/+10
| | | | | | | | 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
* Whitespace cleanup.Dan Albert2015-02-042-63/+55
| | | | llvm-svn: 228195
* Fix _Unwind_Backtrace for libc++abi built with libgcc.Logan Chien2015-01-221-0/+2
| | | | | | | Implement an undocumented _US_FORCE_UNWIND flag for force unwinding. llvm-svn: 226820
* Remove _Unwind_{Get,Set}{GR,IP} from ARM EHABI build.Logan Chien2015-01-221-0/+26
| | | | | | | | | | | | | 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. llvm-svn: 226818
* [libunwind] improve x86_64 comments in compact_unwind_encoding.hNick Kledzik2014-12-201-3/+7
| | | | llvm-svn: 224657
* [libunwind] fix comment in compact_unwind_encoding.hNick Kledzik2014-12-201-1/+1
| | | | llvm-svn: 224656
* [libcxxabi] Add __cxa_thread_atexit for TLS support on Linux.Dan Albert2014-12-181-0/+6
| | | | | | | | | | | | | | | | | | | | | 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
* Fix unicode chars into ascii in comment lines.NAKAMURA Takumi2014-10-271-6/+6
| | | | llvm-svn: 220668
* Correctly export _Unwind_[GS]et(GR|IP) for EHABI.Dan Albert2014-10-131-25/+1
| | | | | | | | | | | | | | | | | | 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 llvm-svn: 219629
* Adding ABI support for __cxa_throw_bad_array_new_length.Aaron Ballman2014-09-111-0/+1
| | | | llvm-svn: 217604
* Make _Unwind_Backtrace() work on ARM.Dan Albert2014-08-291-4/+0
| | | | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 216730
* Land support for ARM EHABI unwinding for libunwind.Nico Weber2014-06-252-20/+40
| | | | | | | | | | | 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> llvm-svn: 211743
* Start landing support for ARM EHABI unwinding.Nico Weber2014-06-253-3/+27
| | | | | | | | 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
* Implement ARM EHABI exception handling.Logan Chien2014-05-102-13/+144
| | | | | | | This commit implements the ARM zero-cost exception handling support for libc++abi. llvm-svn: 208466
* Fixes more incorrect #ifs for SJ/LJ exceptionsJonathan Roelofs2014-05-081-3/+3
| | | | | | Replaces several `#if __arm__` with `#if __USING_SJLJ_EXCEPTIONS__`. llvm-svn: 208352
* Remove unused/obsolete ARM64 constantsNick Kledzik2014-04-241-10/+1
| | | | llvm-svn: 207064
* Fixes incorrect #ifs for SJ/LJ exceptionsDan Albert2014-04-231-1/+1
| | | | | | | 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. llvm-svn: 206941
* [libunwind] remove stray conditionalNick Kledzik2014-01-301-4/+0
| | | | llvm-svn: 200432
* Add a first cut at a Registers_arm class, to be used for 32bit arm EHABI ↵Nico Weber2013-12-181-0/+130
| | | | | | unwinding. llvm-svn: 197591
* Rename LIBUNWIND_AVAIL to LIBUNWIND_UNAVAIL so as to not conflict with other ↵Nick Kledzik2013-11-011-11/+11
| | | | | | (different) LIBUNWIND_AVAIL define llvm-svn: 193839
* unwinder: conditionalise availabilitySaleem Abdulrasool2013-10-171-9/+15
| | | | | | | | __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. llvm-svn: 192868
* libcxxabi contains the runtime support for C++. But, as some folks have Nick Kledzik2013-10-073-0/+1054
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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). llvm-svn: 192136
* Tweaks/cleanups provided by Matthew DempskyHoward Hinnant2013-06-171-168/+0
| | | | llvm-svn: 184118
* Add capability to demangle invocation functions for ObjC blocks.Howard Hinnant2013-04-101-0/+1
| | | | llvm-svn: 179208
* I've moved __cxa_terminate_handler, __cxa_unexpected_handler and ↵Howard Hinnant2012-03-191-17/+0
| | | | | | __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
* Enable __arm__ on appleHoward Hinnant2012-03-141-1/+1
| | | | llvm-svn: 152735
* I had originally made the handler function pointers a static internal ↵Howard Hinnant2012-02-231-0/+17
| | | | | | 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
* Add (reluctantly) a namespace alias for __cxxabiv1.Howard Hinnant2012-02-171-0/+1
| | | | llvm-svn: 150828
* Work on restricting symbol visibility.Howard Hinnant2012-02-021-0/+5
| | | | llvm-svn: 149633
OpenPOWER on IntegriCloud