summaryrefslogtreecommitdiff
path: root/src/cxa_exception.hpp
AgeCommit message (Collapse)Author
2017-05-16[libcxxabi] Align unwindHeader on a double-word boundary.Akira Hatanaka
r276215 made a change to annotate _Unwind_Exception with attribute "aligned" so that an exception object following field __cxa_exception is sufficiently aligned. This fix hasn't been incorporated to unwind.h on Darwin since it is an ABI breaking change. Instead of annotating struct _Unwind_Exception with the attribute, this commit annotates field unwindHeader of __cxa_exception. This ensures the exception object is sufficiently aligned without breaking the ABI. This recommits r302978 and r302981, which were reverted in r303016 because a libcxx test was failing on an AArch64 bot. I also modified the libcxxabi test case to check the alignment of the pointer returned by __cxa_allocate_exception rather than compiling the test with -O1 and checking whether it segfaults. rdar://problem/25364625 Differential Revision: https://reviews.llvm.org/D33030 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@303175 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-14Revert r302978 and r302981.Akira Hatanaka
Revert the two commits to understand why the following aarch64 bot is failing. http://lab.llvm.org:8011/builders/libcxx-libcxxabi-libunwind-aarch64-linux git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@303016 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-13[libcxxabi] Do not align field unwindHeader when building for ARM EHABI.Akira Hatanaka
For ARM EHABI, _Unwind_Exception is an alias of _Unwind_Control_Block, which is not aligned, so we shouldn't align unwindHeader either. rdar://problem/25364625 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@302981 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-13[libcxxabi] Align unwindHeader on a double-word boundary.Akira Hatanaka
r276215 made a change to annotate _Unwind_Exception with attribute "aligned" so that an exception object following field __cxa_exception is sufficiently aligned. This fix hasn't been incorporated to unwind.h on Darwin since it is an ABI breaking change. Instead of annotating struct _Unwind_Exception with the attribute, this commit annotates field unwindHeader of __cxa_exception. This ensures the exception object is sufficiently aligned without breaking the ABI. This recommits r302763 with fixes to RUN lines in the test case. rdar://problem/25364625 Differential Revision: https://reviews.llvm.org/D33030 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@302978 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-11Revert "[libcxxabi] Align unwindHeader on a double-word boundary."Akira Hatanaka
This reverts commit r302763. The commit caused bot failures. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@302764 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-11[libcxxabi] Align unwindHeader on a double-word boundary.Akira Hatanaka
r276215 made a change to annotate _Unwind_Exception with attribute "aligned" so that an exception object following field __cxa_exception is sufficiently aligned. This fix hasn't been incorporated to unwind.h on Darwin since it is an ABI breaking change. Instead of annotating struct _Unwind_Exception with the attribute, this commit annotates field unwindHeader of __cxa_exception. This ensures the exception object is sufficiently aligned without breaking the ABI. rdar://problem/25364625 Differential Revision: https://reviews.llvm.org/D33030 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@302763 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-04Uses quote to include cxxabi.h to make sure the local one is includedMehdi Amini
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@299414 91177308-0d34-0410-b5e6-96231b3b80d8
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
2015-02-05Formatting fixes.Dan Albert
We should clang-format the whole thing when we finally move the unwinder to its new home. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@228360 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
2014-06-25Update libc++abi to use the ARM EHABI unwinder from its libunwind.Nico Weber
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@211745 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-04-12Code cleanup and re-indent cxa_exception.hppLogan Chien
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@206108 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-12[libcxxabi] Fix broken codesourcery.com links in commentsJonathan Roelofs
review: http://llvm-reviews.chandlerc.com/D2718 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@201208 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-30Fix indentation of fields in __cxa_exception to line upMark Seaborn
Align to 8 spaces instead of an inconsistent 9. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@195974 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-02-22Pedantic fix: missing newline at EOFDave Zarzycki
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@151132 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-01Treat all exceptions except that the ones that this library throws as ↵Howard Hinnant
foreign. Even other C++ exceptions. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@149518 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-30Add a descriptive name for a constant. Also I'm at least temporarily waging ↵Howard Hinnant
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. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@149251 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
2012-01-24Move kOurExceptionClass and kOurDependentExceptionClass from source to ↵Howard Hinnant
header so that they can be used in multiple sources. This is a private header, these constants are not publicly exposed. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@148827 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-08Correct comment regarding members of __cxa_dependent_exception. Actually it ↵Howard Hinnant
is useful to disguise a __cxa_dependent_exception as a __cxa_exception by filling in most (not all) of these members at __cxa_dependent_exception construction time. That way most routines don't have to care which kind of exception they have. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@147759 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-08Modified __cxa_end_catch to handle dependent exceptions.Howard Hinnant
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@146172 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-06Add/update copyright noticesHoward Hinnant
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@145949 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-20Exception handling stuctures, and thread-local variables for exception handlingMarshall Clow
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@135586 91177308-0d34-0410-b5e6-96231b3b80d8