summaryrefslogtreecommitdiffstats
path: root/libcxxabi
Commit message (Collapse)AuthorAgeFilesLines
* __cxa_demangle: use default member initializationSaleem Abdulrasool2016-11-181-14/+7
| | | | | | | | 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
* Rename TU names to not conflict with libc++.Eric Fiselier2016-11-184-4/+7
| | | | | | | | | | 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. llvm-svn: 287327
* __cxa_demangle: allow demangling invocation blocksSaleem Abdulrasool2016-11-142-6/+11
| | | | | | | | | | | | 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
* __cxa_demangle: ensure that we have a mangled symbolSaleem Abdulrasool2016-11-141-1/+9
| | | | | | | | | | | | 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
* Fix GCC libc++abi buildEric Fiselier2016-11-132-0/+5
| | | | llvm-svn: 286783
* arm: Fix ttype encoding assertion failure.Logan Chien2016-11-136-3/+210
| | | | | | | | 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
* [CMake] Fix libc++abi arm build w/o libunwind.Logan Chien2016-11-131-1/+1
| | | | | | | | | | | | | | | | | | | 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
* [CMake] Check runtimes subdir when looking for libcxx and libuwindPetr Hosek2016-11-111-4/+14
| | | | | | | | | 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
* [libc++abi] Remove the test for checking using of fallback malloc in case of ↵Igor Kudrin2016-11-091-40/+0
| | | | | | | | dynamic memory exhaustion. This test is too fragile and doesn't add significant value. See https://reviews.llvm.org/D26150 for some details. llvm-svn: 286337
* Revert "[CMake] Check runtimes subdir when looking for libcxx and libuwind"Petr Hosek2016-11-091-6/+1
| | | | | | This reverts commit eecb79506d88b268fb0d00cce178213b4aa17933. llvm-svn: 286334
* [CMake] Check runtimes subdir when looking for libcxx and libuwindPetr Hosek2016-11-091-1/+6
| | | | | | | | | 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
* Fix typo in CMakeLists.txt: provide the path to libcxx checkout and not the ↵Mehdi Amini2016-11-071-1/+1
| | | | | | include subdir llvm-svn: 286164
* Fix libcxxabi CMake detection of libcxx path to handle ↵Mehdi Amini2016-11-071-2/+8
| | | | | | | | LLVM_EXTERNAL_LIBCXX_SOURCE_DIR flag Differential Revision: https://reviews.llvm.org/D26364 llvm-svn: 286161
* Revert "Add some facilities to work with a git monorepo (experimental setup)"Mehdi Amini2016-11-071-2/+0
| | | | | | This reverts commit r286123, accidentally commited while testing itself... llvm-svn: 286124
* Add some facilities to work with a git monorepo (experimental setup)Mehdi Amini2016-11-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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
* [p0012] Implement ABI support for throwing a noexcept function pointer andRichard Smith2016-11-025-1/+208
| | | | | | | | | | | | | | | | 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 llvm-svn: 285867
* Spell libcxxabi-no-threads correctlyEric Fiselier2016-10-311-1/+1
| | | | llvm-svn: 285571
* Mark thread exit test as unsupported w/o threadsEric Fiselier2016-10-301-0/+1
| | | | llvm-svn: 285523
* Get libc++abi building with LLVM_ENABLE_MODULESEric Fiselier2016-10-251-0/+6
| | | | llvm-svn: 285107
* Fix typo in commentVitaly Buka2016-10-151-1/+1
| | | | llvm-svn: 284295
* Don't compile cxa_thread_atexit.cpp with -DLIBCXX_ENABLE_THREADS=OFFVitaly Buka2016-10-141-1/+1
| | | | | | | | | | Reviewers: rmaprath Subscribers: beanz, mgorny Differential Revision: https://reviews.llvm.org/D25636 llvm-svn: 284294
* Mark test as unsupported without threadsEric Fiselier2016-10-142-0/+2
| | | | llvm-svn: 284217
* [libcxxabi] Fix gcc build after r284128Asiri Rathnayake2016-10-131-0/+4
| | | | | | NFC. llvm-svn: 284141
* [libcxxabi] Refactor pthread usage into a separate APIAsiri Rathnayake2016-10-1310-59/+192
| | | | | | | | | | | | | | | | | | 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
* Provide a fallback __cxa_thread_atexit() implementation. Patch from Tavian ↵Eric Fiselier2016-10-126-11/+175
| | | | | | Barnes llvm-svn: 283988
* Fix libc++abi test config after recent libc++ changesEric Fiselier2016-10-121-0/+4
| | | | llvm-svn: 283962
* [libc++abi] Fix bug which cased the static libunwind to always be chosenEric Fiselier2016-10-091-7/+7
| | | | llvm-svn: 283699
* Recommit r282692: [libc++abi] Use fallback_malloc to allocate ↵Igor Kudrin2016-10-077-44/+138
| | | | | | | | | | | | | | | | | __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 llvm-svn: 283531
* [CMake] Fix libc++abi standalone cmake build.Logan Chien2016-10-031-1/+1
| | | | | | | | | | | 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
* Revert r282692: Use fallback_malloc to allocate __cxa_eh_globals in case of ↵Igor Kudrin2016-09-297-130/+44
| | | | | | | | dynamic memory exhaustion. The test breaks build bots. llvm-svn: 282703
* [libc++abi] Use fallback_malloc to allocate __cxa_eh_globals in case of ↵Igor Kudrin2016-09-297-44/+130
| | | | | | | | | | | | | | 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 llvm-svn: 282692
* [libc++abi] Default to DLL annotations on WindowsShoaib Meenai2016-09-272-3/+16
| | | | | | | | | | | | `__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
* annotate more function visibilitySaleem Abdulrasool2016-09-232-10/+10
| | | | | | | | 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
* [libcxxabi] cleanup the use of LIBCXXABI_HAS_NO_THREADS macro (NFC)Asiri Rathnayake2016-09-219-62/+47
| | | | | | | Align the naming / use of the macro LIBCXXABI_HAS_NO_THREADS to follow what we have in libcxx. NFC. llvm-svn: 282062
* Fix side effect in assertionEric Fiselier2016-09-161-1/+1
| | | | llvm-svn: 281709
* [lit] Replace print with lit_config.note().Logan Chien2016-09-021-1/+1
| | | | | | | This commit replaces print statement with lit_config.note(). This fixes python3 support for check-libcxxabi. llvm-svn: 280484
* libc++abi: fix some -Wunused-function warningsSaleem Abdulrasool2016-08-311-12/+16
| | | | | | | 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
* Wrap LIBCXXABI_USE_LLVM_UNWINDER with defined().Logan Chien2016-08-311-2/+2
| | | | | | | | | | | | This commit fixes -Wundef by replacing: #if !LIBCXXABI_USE_LLVM_UNWINDER with: #if !defined(LIBCXXABI_USE_LLVM_UNWINDER) llvm-svn: 280251
* [CMake] Trying to fix the bots I brokeChris Bieneman2016-08-291-1/+1
| | | | | See: http://lab.llvm.org:8011/builders/libcxx-libcxxabi-x86_64-linux-ubuntu-cxx1z/builds/981/steps/build.libcxxabi/logs/stdio llvm-svn: 280023
* [CMake] Use -std=c++11 if supportedChris Bieneman2016-08-291-0/+5
| | | | | | | | | | | | 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
* [CMake] Be more consistent about naming targets and components in libc++abiEric Fiselier2016-08-283-6/+12
| | | | | | | | | | | | | | | | | | 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
* [CMake] Apply r279151 cleanup to libc++abi.Eric Fiselier2016-08-284-10/+13
| | | | | | | | | | | | 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
* test: fix test under ASAN and MSANSaleem Abdulrasool2016-08-281-0/+4
| | | | | | | | | | | | 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
* Default LIBCXXABI_LIBDIR_SUFFIX to LLVM_LIBDIR_SUFFIXEric Fiselier2016-08-161-1/+1
| | | | llvm-svn: 278773
* Fix ASAN failures in the demanglerMehdi Amini2016-08-132-11/+72
| | | | | | These were found fuzzing with ASAN. llvm-svn: 278579
* Depend directly on unwind when not building standalonePetr Hosek2016-08-091-2/+7
| | | | | | | | | 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
* Add lib directory to linker paths when using libunwindPetr Hosek2016-08-091-0/+3
| | | | | | | | | | 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
* Do not depend on unwind when building standalonePetr Hosek2016-08-081-4/+3
| | | | | | | | | | 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
* CMakeLists.txt cleanups: synchronize version with rest of LLVM, consistent ↵Eugene Zelenko2016-08-081-5/+4
| | | | | | | | spacing. Differential revision: https://reviews.llvm.org/D23092 llvm-svn: 278030
* Attempt to bring peace to -Werror buildbots.Richard Smith2016-07-191-0/+6
| | | | llvm-svn: 276022
OpenPOWER on IntegriCloud