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.
llvm-svn: 287364
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.
llvm-svn: 286793
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.
llvm-svn: 286788
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.
llvm-svn: 286760
This commit fixes libc++abi build when LLVM unwinder (libunwind_llvm) is
not enabled.
This commit fixes the problem by removing "LLVM_NATIVE_ARCH MATCHES ARM"
from CMakeLists.txt so that LIBCXXABI_USE_LLVM_UNWINDER will only be
defined when LLVM unwinder is enabled.
We need LIBCXXABI_USE_LLVM_UNWINDER becase there is a subtle difference
between the unwinder from libgcc and the one from libunwind_llvm. For
the unwinder from libgcc, we have to initialize register r12 with the
address of _Unwind_Control_Block; otherwise,
_Unwind_GetLanguageSpecificData() and _Unwind_GetRegionStart() won't
work properly. Consequently, there is an extra _Unwind_SetGR() when
LLVM unwinder is disabled. Check cxa_personality.cpp for details.
llvm-svn: 286759
The runtimes subdir is the new location for runtimes, we should
include it when looking for libcxx and libunwind headers.
Differential Revision: https://reviews.llvm.org/D26362
llvm-svn: 286614
The runtimes subdir is the new location for runtimes, we should
include it when looking for libcxx and libunwind headers.
Differential Revision: https://reviews.llvm.org/D26362
llvm-svn: 286332
Summary:
Some changes are made to cmake, especially the addition of a new
LLVM_ENABLE_PROJECTS option that makes the build system aware of
the monorepo directory structure.
Also a new script is added in llvm/utils/git-svn/. When present in
the $PATH, it enables a `git llvm` command. It is providing at this
point only the ability to push from the git monorepo: `git llvm push`.
It is intended to evolves with more features, for instance I plan on
features like `git llvm show r284955` to help working with sequential
revision numbers.
The push feature is taken from Justin Lebar's script available here:
https://github.com/jlebar/llvm-repo-tools/
Reviewers: jlebar
Subscribers: mgorny, modocache, llvm-commits
Differential Revision: https://reviews.llvm.org/D26334
llvm-svn: 286123
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)
llvm-svn: 284128
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
llvm-svn: 283531
The cmake files install directory has been changed to
${prefix}/lib/cmake/llvm since r259821. Searching cmake modules in
${prefix}/share/llvm/cmake will result in fatal errors.
This commit fixes the out-of-tree build by changing the CMake module
search path to: "$(llvm-config --obj-root)/lib/cmake/llvm"
llvm-svn: 283100
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
llvm-svn: 282692
`__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
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.
llvm-svn: 282300
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.
llvm-svn: 280286
Summary: This patch adds a check for if -std=c++11 is a supported flag, and adds it to CMAKE_CXX_FLAGS if it is supported.
Reviewers: EricWF
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D24007
llvm-svn: 280021
This patch (and commit summary) mirror r279675 by Chris B which was applied
to libc++ but not libc++abi.
Summary:
The point of this patch is to have a consistent convention for naming build,
check and install targets so that the targets can be constructed from the
project name.
This change renames a bunch of CMake components and targets from libcxxabi to
cxxabi. For each renamed target I've added a convenience target that matches
the old target name and depends on the new target. This will preserve function
of the old targets so that the change doesn't break the world. We can evaluate
if it is worth removing the extra targets later.
llvm-svn: 279938
This patch applies changes similar to those in r279515 to libc++abi.
Summary of changes in this patch:
* Renamed variable LLVM_CONFIG -> LLVM_CONFIG_PATH
* Renamed variable LIBCXXABI_BUILT_STANDALONE -> LIBCXXABI_STANDALONE_BUILD
* Add an include of AddLLVM in the tests subdirectory for add_lit_testsuite.
llvm-svn: 279936
When we're running tests under ASAN or MSAN, they're compiled with -O1, which
enables tail call elimination. This causes backtrace_test to fail: the compiler
performs tail call elimination for call3_nothrow, but it can't for call3_throw,
leading to a mismatched frame count. Disable tail call elimination (and
inlining, just to be explicit) to avoid this.
Patch by Shoaib Meenai!
llvm-svn: 279935
When using libunwind and not building as standalone project, we
can directly depend on the unwind library target.
Differential Revision: https://reviews.llvm.org/D23289
llvm-svn: 278169
When using libunwind and not building as standalone project, we
need to add LLVM library directory to the list of linker directories
to ensure it can find libunwind dependency.
Differential Revision: https://reviews.llvm.org/D23287
llvm-svn: 278076
When libcxxabi is being built standalone, unwind dependency is not
available, so do not use it even when LLVM unwinder is being
requested.
Differential Revision: https://reviews.llvm.org/D23228
llvm-svn: 278058