summaryrefslogtreecommitdiffstats
path: root/libcxxabi
Commit message (Collapse)AuthorAgeFilesLines
* Fix ASAN build with older compiler-rt versions.Eric Fiselier2017-09-141-3/+2
| | | | | | | | | | | compiler-rt recently added the __asan_handle_no_return() function that libc++abi needs to use, however older versions of compiler-rt don't declare this interface publicly and that breaks the libc++abi build. This patch attempts to fix the issues by declaring the asan function explicitly, so we don't depend on compiler-rt to provide the declaration. llvm-svn: 313308
* [libc++abi] Fix ASAN build with older compiler-rt versions.Eric Fiselier2017-09-141-1/+2
| | | | | | | | | | | | | | | | | | | Summary: compiler-rt recently added the `__asan_handle_no_return()` function that libc++abi needs to use, however older versions of compiler-rt don't provide this interface and that breaks the libc++abi build. This patch attempts to fix the issues by using a macro to detect if `asan_interface.h` is new enough to provide the function. See D37871 Reviewers: phosek, vitalybuka Reviewed By: phosek, vitalybuka Subscribers: dberris, cfe-commits Differential Revision: https://reviews.llvm.org/D37872 llvm-svn: 313304
* Reland "When built with ASan, __cxa_throw calls __asan_handle_no_return"Petr Hosek2017-09-131-0/+10
| | | | | | | | | | | | | | | The ASan runtime on many systems intercepts cxa_throw just so it can call asan_handle_no_return first. Some newer systems such as Fuchsia don't use interceptors on standard library functions at all, but instead use sanitizer-instrumented versions of the standard libraries. When libc++abi is built with ASan, cxa_throw can just call asan_handle_no_return itself so no interceptor is required. Patch by Roland McGrath Differential Revision: https://reviews.llvm.org/D37229 llvm-svn: 313215
* Revert "[libcxxabi] When built with ASan, __cxa_throw calls ↵Petr Hosek2017-09-061-10/+0
| | | | | | | | | __asan_handle_no_return" This reverts commit r312606 because it's causing an error on libcxx-libcxxabi-x86_64-linux-ubuntu-asan bot. llvm-svn: 312609
* [libcxxabi] When built with ASan, __cxa_throw calls __asan_handle_no_returnPetr Hosek2017-09-061-0/+10
| | | | | | | | | | | | | | | | | | The ASan runtime on many systems intercepts cxa_throw just so it can call asan_handle_no_return first. Some newer systems such as Fuchsia don't use interceptors on standard library functions at all, but instead use sanitizer-instrumented versions of the standard libraries. When libc++abi is built with ASan, cxa_throw can just call asan_handle_no_return itself so no interceptor is required. This is a re-land of r311045, which has become safe after r311869 changed compiler-rt to declare __asan_handle_no_return. Patch by Roland McGrath Differential Revision: https://reviews.llvm.org/D37229 llvm-svn: 312606
* Revert "[libcxxabi] When built with ASan, __cxa_throw calls ↵Petr Hosek2017-08-161-10/+0
| | | | | | | | | __asan_handle_no_return" This reverts commit r311045 because it's causing an error on libcxx-libcxxabi-x86_64-linux-ubuntu-asan bot. llvm-svn: 311047
* [libcxxabi] When built with ASan, __cxa_throw calls __asan_handle_no_returnPetr Hosek2017-08-161-0/+10
| | | | | | | | | | | | | | | The ASan runtime on many systems intercepts cxa_throw just so it can call asan_handle_no_return first. Some newer systems such as Fuchsia don't use interceptors on standard library functions at all, but instead use sanitizer-instrumented versions of the standard libraries. When libc++abi is built with ASan, cxa_throw can just call asan_handle_no_return itself so no interceptor is required. Patch by Roland McGrath Differential Revision: https://reviews.llvm.org/D36599 llvm-svn: 311045
* [demangler] Fix some more -Wshadow warnings I missed in r310535Erik Pilkington2017-08-101-3/+3
| | | | llvm-svn: 310546
* [demangler] Fix a bunch of -Wshadow warningsErik Pilkington2017-08-091-105/+105
| | | | | | These were causing failures in -Werror builds. llvm-svn: 310535
* Mark test as unsupported c++98/03 to fix buildbotsErik Pilkington2017-08-091-0/+2
| | | | llvm-svn: 310530
* [demangler] Improve representation of substitutions/templatesErik Pilkington2017-08-092-190/+387
| | | | | | Differential revision: https://reviews.llvm.org/D36427 llvm-svn: 310525
* [demangler] Rename some variables, NFCErik Pilkington2017-08-081-662/+662
| | | | llvm-svn: 310415
* [libc++abi] Use proper calling convention for TLS destructorShoaib Meenai2017-08-081-1/+1
| | | | | | This is needed when using Windows threading. llvm-svn: 310329
* [demangler] Fix another oss-fuzz bugErik Pilkington2017-08-062-1/+2
| | | | llvm-svn: 310226
* [demangler] Fix another bug found by oss-fuzz in r309340Erik Pilkington2017-08-012-0/+3
| | | | llvm-svn: 309650
* [demangler] Use _LIBCPP_UNREACHABLE()Erik Pilkington2017-08-011-2/+2
| | | | llvm-svn: 309649
* libcxxabi: Suppress LLVM_ENABLE_MODULESNAKAMURA Takumi2017-07-311-0/+6
| | | | | | Differential Revision: https://reviews.llvm.org/D35542 llvm-svn: 309551
* [demangler] Fix some bugs in r309340 found by oss-fuzzErik Pilkington2017-07-302-7/+27
| | | | llvm-svn: 309520
* [demangler] Fix some overzealous -Wreturn-type errorsErik Pilkington2017-07-281-0/+2
| | | | llvm-svn: 309349
* [demangler] Attempt to fix linux bots, include <cstdio>Erik Pilkington2017-07-281-0/+1
| | | | llvm-svn: 309342
* [demangler] Use an AST to represent demangled namesErik Pilkington2017-07-282-925/+1981
| | | | | | | | | | | | The demangler now demangles by producing an AST, then traverses that AST to produce a demangled name. This is done for performance reasons, now the demangler doesn't manuiplate std::strings, which hurt performance and caused string operations to be inlined into the parser, leading to large code size and stack usage. Differential revision: https://reviews.llvm.org/D35159 llvm-svn: 309340
* Update version to 6.0.0svnHans Wennborg2017-07-191-1/+1
| | | | llvm-svn: 308461
* [demangler] Respect try_to_parse_template_argsErik Pilkington2017-07-132-10/+14
| | | | | | Fixes an exponential parse found by oss-fuzz. llvm-svn: 307941
* Remove dependancy on __refstring header; use local copy instead.Eric Fiselier2017-07-122-1/+132
| | | | | | | | | | | | | | This patch removes the dependancy on libc++'s __refstring header, which was only a header in the first place so that libc++abi could build library code using it, and not because libc++ needed it in the headers. This patch allows libc++ to stop shipping <__refstring> publicaly at the cost of duplicating it across projects. Ideally libc++abi would always require the libc++ sources when building, but that's a separate discussion I plan to start on the mailing lists shortly. llvm-svn: 307748
* [libcxxabi][CMake] Add install path variable to allow overriding the destinationPetr Hosek2017-07-112-2/+9
| | | | | | | | | This is going to be used by the runtime build in the multi-target setup to allow using different install prefix for each target. Differential Revision: https://reviews.llvm.org/D33761 llvm-svn: 307611
* [Demangler] NFC: Don't make the parse_* functions templatesErik Pilkington2017-07-081-180/+117
| | | | | | Differential revision: https://reviews.llvm.org/D35158 llvm-svn: 307482
* [Demangler] NFC: Move Db struct to beginning of fileErik Pilkington2017-07-081-207/+206
| | | | | | Differential revision: https://reviews.llvm.org/D35158 llvm-svn: 307481
* Fix incomplete type test on OS X; workaround weird DYLD_LIBRARY_PATH behaviorEric Fiselier2017-07-061-1/+5
| | | | llvm-svn: 307230
* Add some catch(...) blocks to the tests so that if they fail, we get a good ↵Marshall Clow2017-06-221-0/+13
| | | | | | error message. No functional change. llvm-svn: 305977
* Use _LIBCPP_FALLTHROUGH() to avoid warnings about [[gnu::fallthrough]] being ↵Eric Fiselier2017-06-151-1/+1
| | | | | | unsupported llvm-svn: 305500
* Set a default value for LIBCXXABI_LIBDIR_SUFFIX, fixes installing into lib64 ↵Ismail Donmez2017-06-131-0/+2
| | | | | | after r304374 llvm-svn: 305278
* build: use cmake to pass -std=c++11Saleem Abdulrasool2017-06-112-5/+18
| | | | | | | | | | Rather than manually checking for support for the spelling of the C++ standard, indicate to CMake that we require that the compiler support C++11 and that we compile without the GNU extensions. This simplifies the flags handling in libc++abi itself by relying on CMake to translate the flag and add it as appropriate. llvm-svn: 305175
* build: use POSITION_INDEPENDENT_CODE CMake propertySaleem Abdulrasool2017-06-112-16/+23
| | | | | | | | | | | | Use the POSITION_INDEPENDENT_CODE target property to indicate that we should be building with -fPIC or the equivalent flag based on the toolchain that we are using. This makes the check more portable and simplifies the flags management. Because we don't want this setting to propagate in the case of an in-tree build, set the property on the targets we construct explicitly rather than setting CMAKE_POSITION_INDEPENDENT_CODE to ON globally. llvm-svn: 305174
* cxa_demangle: fix -Wimplicit-fallthrough for GCC:7Saleem Abdulrasool2017-06-111-1/+1
| | | | | | | Use the C++11 (formalised in C++17) tag to indicate a fallthrough in the switch case. Silences a -Wimplicit-fallthrough warning with gcc:7 llvm-svn: 305173
* private_typeinfo: add missing field initializersSaleem Abdulrasool2017-06-111-3/+3
| | | | | | | Cleanup the -Wmissing-field-initializers warnings from gcc:7 builds. NFC. llvm-svn: 305172
* [libcxxabi] HandleLLVMOptions in out of tree buildMartell Malone2017-06-031-0/+1
| | | | | | Differential revision: https://reviews.llvm.org/D33753 llvm-svn: 304664
* [libcxxabi] Rework CMakeLists.txt into modulesMartell Malone2017-06-015-170/+430
| | | | | | | | | | Refactor cmake to remove dependence on LLVM's cmake modules. This improves handling of cmake checks when cross compiling and brings libcxxabi in line with libcxx and other project modules. Differential revision: https://reviews.llvm.org/D33635 llvm-svn: 304374
* Remove requirement for libunwind sources. Patch by Shiz.Eric Fiselier2017-05-311-19/+0
| | | | | | | | | As per r241993, libunwind_ext.h is not used anymore, and thus only the public libunwind includes are needed. This eases distro packaging efforts and removes an unneeded requirement for out-of-tree building. Reviewed as D33178 llvm-svn: 304359
* [demangler] Fix a exponential string copying bugErik Pilkington2017-05-282-0/+5
| | | | | | | | | | | The problem was that if base_name() was called from a context without an actual base name, it could gulp up the entire string, which can result in recursive duplications. The fix is to be more strict as to what qualifies as a base name. Differential revision: https://reviews.llvm.org/D33637 llvm-svn: 304113
* [libcxxabi] Disable DLL annotations on staticMartell Malone2017-05-281-1/+1
| | | | | | | | rL288692 renames _LIBCXXABI_DISABLE_DLL_IMPORT_EXPORT to _LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS llvm-svn: 304110
* [libcxxabi] iconv is not needed for mingw-w64Martell Malone2017-05-261-1/+1
| | | | llvm-svn: 304026
* [Demangler] Remove a failing assert introduced in r303718Erik Pilkington2017-05-241-3/+1
| | | | llvm-svn: 303806
* __cxa_demangle: Fix constructor cv qualifier handlingTamas Berghammer2017-05-242-0/+3
| | | | | | | | | | | | | | | | | Summary: Previously if we parsed a constructor then we set parsed_ctor_dtor_cv to true and never reseted it. This causes issue when a template argument references a constructor (e.g. type of lambda defined inside a constructor) as we will have the parsed_ctor_dtor_cv flag set what will cause issues when parsing later arguments. Reviewers: EricWF, compnerd Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D33385 llvm-svn: 303737
* [demangler] Fix a crash in the demangler during parsing of a lamdbaErik Pilkington2017-05-242-24/+34
| | | | | | | | | The problem is that multiple types could have been parsed from parse_type(), which the lamdba parameter parsing didn't handle. Differential revision: https://reviews.llvm.org/D33368 llvm-svn: 303718
* [libcxxabi] Fix the test case committed in r303175.Akira Hatanaka2017-05-161-0/+1
| | | | | | | | | | Free the __cxa_exception object allocated with __cxa_allocate_exception. This is an attempt to fix this asan bot: http://lab.llvm.org:8011/builders/libcxx-libcxxabi-x86_64-linux-ubuntu-asan/builds/560 llvm-svn: 303194
* [libcxxabi] Align unwindHeader on a double-word boundary.Akira Hatanaka2017-05-162-0/+53
| | | | | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 303175
* Revert r302978 and r302981.Akira Hatanaka2017-05-142-68/+0
| | | | | | | | | Revert the two commits to understand why the following aarch64 bot is failing. http://lab.llvm.org:8011/builders/libcxx-libcxxabi-libunwind-aarch64-linux llvm-svn: 303016
* [libcxxabi] Do not align field unwindHeader when building for ARM EHABI.Akira Hatanaka2017-05-131-3/+15
| | | | | | | | | 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 llvm-svn: 302981
* [libcxxabi] Align unwindHeader on a double-word boundary.Akira Hatanaka2017-05-132-2/+58
| | | | | | | | | | | | | | | | | | | 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 llvm-svn: 302978
* [Libcxxabi]: Support using compiler-rt for MinGW64Martell Malone2017-05-111-3/+8
| | | | | | | | Reviewers: EricWF Differential Revision: https://reviews.llvm.org/D33098 llvm-svn: 302824
OpenPOWER on IntegriCloud