Age | Commit message (Collapse) | Author |
|
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@299414 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@299143 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
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
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@299129 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This was originally there for the _POSIX_THREADS define, to detect the
presence of pthreads. That went away with the externalized threading
support, so the include can go away too.
config.h is now completely empty. A follow-up commit will remove it
entirely.
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@299087 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This patch fully reformats fallback_malloc.cpp. Previously the test
was a mess of different styles and indentations. This made it very
hard to work in and read. Therefore I felt it was best to re-format
the whole thing.
Unfortuantly this means some history will be lost, but hopefully
much of it will still be accessible after ignoring whitespace changes.
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@296960 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
In 32 bit builds on a 64 bit system `std::malloc` does not return correctly aligned memory. This leads to undefined behavior.
This patch switches to using `posix_memalign` to allocate correctly aligned memory instead.
Reviewers: mclow.lists, danalbert, jroelofs, compnerd
Reviewed By: compnerd
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D25417
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@296952 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@296936 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
Currently both libc++ and libc++abi provide definitions for operator new/delete. However I believe this is incorrect and that one or the other should offer them.
This patch adds the CMake option `-DLIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS` which defaults to `OFF` unless otherwise specified. This means that by default
only libc++ provides the new/delete definitions.
Reviewers: mclow.lists, mehdi_amini, dexonsmith, beanz, jroelofs, danalbert, smeenai, rmaprath, mgorny
Reviewed By: mehdi_amini
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D30517
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@296801 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
Currently both libc++ and libc++abi provide definitions for new/delete. However libc++abi's definitions haven't been updated to include aligned new/delete or sized deallocation.
I don't see any reason why libc++abi shouldn't provide these newer overloads.
This patch copies libc++'s implementation of `new/delete` into libc++abi so that it's now up to date.
After applying this patch I plan to fix a longstanding bug where both libc++ and libc++abi provide definitions for new/delete.
Reviewers: mclow.lists, mehdi_amini, dexonsmith, danalbert, smeenai, rmaprath, jroelofs
Reviewed By: mehdi_amini
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D30514
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@296787 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This patch cleans up how libc++abi handles the definitions for new/delete.
It is in preperation for upcoming changes to fix how both libc++ and libc++abi
handle new/delete.
The primary changes in this patch are:
* Move the definitions for bad_array_length and bad_new_array_length
into stdlib_exception.cpp. This way stdlib_new_delete.cpp only
contains new/delete.
* Rename cxa_new_delete.cpp -> stdlib_new_delete.cpp for consistency
with other files.
* Add a FIXME regarding when stdlib_new_delete.cpp is actually compiled
as part of the dylib.
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@296715 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
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
|
|
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
|
|
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
|
|
Made a mistake in the condition typo because LIBCXXABI_BAREMETAL is always
defined, I should have been checking the contents to see if it's enabled.
Differential Revision: https://reviews.llvm.org/D30343
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@296146 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
We've been having issues with using libcxxabi and libunwind for baremetal
targets because fprintf is dependent on io functions, this patch disables calls
to fprintf when building for baremetal in release mode.
Differential Revision: https://reviews.llvm.org/D30339
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@296136 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
When libcxxabi is built in LIBCXXABI_SILENT_TERMINATE mode, libcxx test suite reports
two failures:
std/depr/exception.unexpected/set.unexpected/get_unexpected.pass.cpp
std/depr/exception.unexpected/set.unexpected/set_unexpected.pass.cpp
This is because the default unexpected handler is set to std::abort instead of
std::terminate which these tests expect.
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@295175 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
When building as part of runtimes, there is no predefined order in
which the runtimes are loaded, so the targets from other projects
might not be available. We need to rely on HAVE_<name> variables
instead in that case.
Differential Revision: https://reviews.llvm.org/D29574
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@294552 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
grammar for mangling for these names are "<special-name> ::= TW <object name>" for wrapper variables or "<special-name> ::= TH <object name>" for initialization variables.
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@293638 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Found with ASAN + libFuzzer by Kostya Serebryany <kcc@google.com>
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@293330 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Pull the dependency on pthread_mach_thread_np() back into libcxxabi.
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@293166 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
When checking if the type is a r-value ref, we would not do a complete
check. This would result in us treating a trailing parameter reference
`&)` as a r-value ref, and improperly inject the cv qualifier on the
type. We now correctly demangle the type `KFvRmE` as a constant
function rather than a constant reference.
Fixes PR31741!
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@292973 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Fix an off-by-one case which would destroy the final parameter in a
CV-qualified function type with a reference. We still get the CV
qualification incorrect, but at least we do not clobber the type name
any longer.
Partially fixes PR31741.
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@292963 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
The Itanium ABI [1] specifies that __cxa_demangle accept either:
1) symbol names, which start with "_Z"
2) type manglings, which do not start with "_Z"
r286788 erroneously assumes that it should only handle symbols, so this patch
reverts it and adds a counterexample to the testcase.
1: https://mentorembedded.github.io/cxx-abi/abi.html#demangler
Reviewers: zygoloid, EricWF
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@292418 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
The current std::terminate_handler pulls in some string code, some I/O
code, and more. Since it is automatically setup as the default, this
means that any trivial binary linking against libcxxabi will get this
extra bloat.
This patch allows disabling it as a build-time option, if you want to
avoid the extra bloat.
Patch by Tom Rybka!
Reviewers: EricWF
Subscribers: danalbert, llvm-commits, mgorny
Differential Revision: https://reviews.llvm.org/D28497
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@291946 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
+ Now that libcxxabi shares the same threading API as libcxx, a whole
chunk of code in src/config.h is made redundant (I missed this earlier).
+ r291275 split off the externalized-thread-api libcxx configuration from the
external-thread-library libcxx configuration. libcxxabi should follow the
same approach.
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@291440 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@290937 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
r281179 Introduced an externally threaded variant of the libc++ library. This
patch adds support for a similar library variant for libc++abi.
Differential revision: https://reviews.llvm.org/D27575
Reviewers: EricWF
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@290888 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@290847 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Clean up the misleading indentation warning from GCC 6. NFC
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@290788 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
and catching as non-noexcept to match the final design per discusson on
cxx-abi-dev.
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@288457 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Sink the Db initialization into the structure rather than out-of-line at the
declaration size. This just makes it easier to see what initialization is being
performed. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@287364 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
In order to easily merge libc++ and libc++abi static archives it's important
that none of the source files share the same name.
(See http://stackoverflow.com/questions/3821916/how-to-merge-two-ar-static-libraries-into-one)
This patch renames source files which share a name with libc++ sources.
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@287327 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
The block invocation function uses an extension where the prefix is ___Z
as opposed to _Z. This should make the tests pass again.
Disable a negative test which was testing a crasher. The symbol being
demangled is not a valid mangled symbol and will return a nullptr.
Adjust the type info decoding test to be a valid symbol name.
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@286793 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Ensure that we have a mangled symbol before attempting to demangle it. We would
previously treat any input as a mangled symbol rather than checking that the
symbol has the initial C++ Itanium v3 mangling prefix of `_Z`. This changes the
behaviour from the previous case which would undecorate `f` to `float` rather
than nullptr as it should.
Unfortunately, we do not have any negative testing for the demangler.
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@286788 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
GCC 4.7 or newer emits 0x90 (indirect | pcrel) as the ttype encoding.
This would hit an assertion in cxa_personality.cpp. This commit fixes
the problem by relaxing the assertion.
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@286760 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
catching as non-noexcept
This implements the following proposal from cxx-abi-dev:
http://sourcerytools.com/pipermail/cxx-abi-dev/2016-October/002988.html
... which is necessary for complete support of http://wg21.link/p0012,
specifically throwing noexcept function and member function pointers and
catching them as non-noexcept pointers.
Differential Review: https://reviews.llvm.org/D26178
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@285867 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@285107 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@284295 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Reviewers: rmaprath
Subscribers: beanz, mgorny
Differential Revision: https://reviews.llvm.org/D25636
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@284294 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
NFC.
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@284141 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This patch refactors all pthread uses of libc++abi into a separate API. This
is the first step towards supporting an externlly-threaded libc++abi library.
I've followed the conventions already used in the libc++ library for the same
purpose.
Patch from: Saleem Abdulrasool and Asiri Rathnayake
Reviewed by: compnerd, EricWF
Differential revisions:
https://reviews.llvm.org/D18482 (original)
https://reviews.llvm.org/D24864 (final)
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@284128 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Barnes
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@283988 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@283699 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
__cxa_eh_globals in case of dynamic memory exhaustion.
Throwing an exception for the first time may lead to call calloc to
allocate memory for __cxa_eh_globals. If the memory pool is exhausted
at that moment, it results in abnormal termination of the program.
This patch addresses the issue by using fallback_malloc in that case.
In this revision, some restrictions were added into the test to not
run it in unsuitable environments.
Differential Revision: https://reviews.llvm.org/D17815
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@283531 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
dynamic memory exhaustion.
The test breaks build bots.
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@282703 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
dynamic memory exhaustion.
Throwing an exception for the first time may lead to call calloc to
allocate memory for __cxa_eh_globals. If the memory pool is exhausted
at that moment, it results in abnormal termination of the program.
This patch addresses the issue by using fallback_malloc in that case.
Differential Revision: https://reviews.llvm.org/D17815
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@282692 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
These data and text symbols were missing annotations for building with hidden
visibility. As we do not currently enable hidden visibility by default, this is
a NFC for the buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@282300 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Align the naming / use of the macro LIBCXXABI_HAS_NO_THREADS to follow what we
have in libcxx. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@282062 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
is_initialized is only used in the no threads case or if on non ARM Apple
targets. Use the preprocessor to remove the function otherwise. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@280286 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This commit fixes -Wundef by replacing:
#if !LIBCXXABI_USE_LLVM_UNWINDER
with:
#if !defined(LIBCXXABI_USE_LLVM_UNWINDER)
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@280251 91177308-0d34-0410-b5e6-96231b3b80d8
|