summaryrefslogtreecommitdiffstats
path: root/libcxxabi
Commit message (Collapse)AuthorAgeFilesLines
...
* [demangler] Refactor the type parserErik Pilkington2018-02-051-821/+595
| | | | | | Differential revision: https://reviews.llvm.org/D41889 llvm-svn: 324282
* [demangler] return early if conditional expr parsing failedErik Pilkington2018-02-051-2/+7
| | | | | | This should fix some bugs found by oss-fuzz. llvm-svn: 324203
* [demangler] Clean up the expression parserErik Pilkington2018-02-022-1441/+912
| | | | | | | | | | | | | | | | This commit cleans up the expression parser, using a new style: - parse* functions now return Node pointers. - The mangled name is now held in Db and accessed with look() and consume() - LLVM coding style This style is meant to avoid the 2 most common types of bugs in the old demanger, namely misusing the Names stack (ie, calling back() on empty) and going out of bounds on the mangled name. I also think it makes the demangler a lot cleaner. Differential revision: https://reviews.llvm.org/D41887 llvm-svn: 324111
* [demangler] Improve variadic template supportErik Pilkington2018-01-313-416/+593
| | | | | | | | | | | | | | This commit changes how variadic templates are represented in the demangler, in order to fix some longstanding bugs. Now instead of expanding variadic templates during parsing, the expansion is done during printing by reusing the unexpanded AST. This allows the demangler to handle cases where multiple packs contribute to a single production, and correctly handle "Dp" and "sp" productions, which corrispond to pack expansions in type and expression contexts. Differential revision: https://reviews.llvm.org/D41885 llvm-svn: 323906
* [cmake] [libcxxabi] LLVM_FOUND isn't always set, so just test ifDon Hinton2018-01-271-1/+1
| | | | | | llvm_setup_rpath() is available instead. llvm-svn: 323600
* Reland:Don Hinton2018-01-261-0/+3
| | | | | | | | | | | [cmake] [libcxxabi] Call llvm_setup_rpath() when adding shared libraries. Clang and llvm already use llvm_setup_rpath(), so this change will help standarize rpath usage across all projects. Differential Revision: https://reviews.llvm.org/D42460 llvm-svn: 323495
* Revert [libcxxabi] r323455 - [cmake] [libcxxabi] Call llvm_setup_rpath() ↵Don Hinton2018-01-251-1/+0
| | | | | | | | | | when adding shared libraries. Shoaib Meenai pointed out this will break standalone builds can be built without llvm. Differential Revision: https://reviews.llvm.org/D42460 llvm-svn: 323458
* [cmake] [libcxxabi] Call llvm_setup_rpath() when adding shared libraries.Don Hinton2018-01-251-0/+1
| | | | | | | | | Clang and llvm already use llvm_setup_rpath(), so this change will help standarize rpath usage across all projects. Differential Revision: https://reviews.llvm.org/D42460 llvm-svn: 323455
* [libc++abi] Fix unused function when building with LIBCXXABI_SILENT_TERMINATEPeter Collingbourne2018-01-251-1/+1
| | | | | | | | | | | This fixes: src/cxa_default_handlers.cpp:25:13: error: unused function 'demangling_terminate_handler' [-Werror,-Wunused-function] Patch by Thomas Anderson! Differential Revision: https://reviews.llvm.org/D42399 llvm-svn: 323397
* [cmake] [libcxxabi] Fix find_path() problems when cross compilingDon Hinton2018-01-221-0/+3
| | | | | | | | | | | | | | | | When CMAKE_SYSROOT or CMAKE_FIND_ROOT_PATH is set, cmake recommends setting CMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY globally which means find_path() always prepends CMAKE_SYSROOT or CMAKE_FIND_ROOT_PATH to all paths used in the search. However, these find_path() invocations are looking for paths in the libcxx and libunwind projects on the host system, not the target system, which can be done by passing NO_CMAKE_FIND_ROOT_PATH. Differential Revision: https://reviews.llvm.org/D41623 llvm-svn: 323145
* [cmake] [libcxxabi] Don't print warning when tests are disabled.Don Hinton2018-01-181-14/+17
| | | | | | | | | | | | Summary: Don't print, possibly erroneous, warning if LIBCXXABI_INCLUDE_TESTS is false. This patch fixes a problem introduced in r291367. Differential Revision: https://reviews.llvm.org/D42229 llvm-svn: 322870
* Fix standalone test-suite run.Eric Fiselier2018-01-172-11/+20
| | | | | | | | | This patch updates libc++abi's HandleOutOfTreeLLVM.cmake to match libc++'s -- and more importantly, to fix a bug where llvm-lit wasn't found/created when libc++abi was built out-of-tree. This prevented the test suite from running. llvm-svn: 322768
* Update version to 7.0.0svnHans Wennborg2018-01-031-1/+1
| | | | llvm-svn: 321726
* Try again, this time with the correct addressJonathan Roelofs2017-12-291-1/+1
| | | | llvm-svn: 321569
* Update CREDITS.txt with personal email addressJonathan Roelofs2017-12-291-1/+1
| | | | llvm-svn: 321564
* [libcxxabi] Pass LIBCXXABI_SYSROOT and LIBCXXABI_GCC_TOOLCHAIN to litPetr Hosek2017-12-121-0/+2
| | | | | | | | These are expected to be set by the shared lit scripts used from libc++. Differential Revision: https://reviews.llvm.org/D40818 llvm-svn: 320445
* [libcxxabi] Set up .arcconfig to point to new Diffusion CXXA repositoryBen Hamilton2017-12-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: We want to automatically copy the appropriate mailing list for review requests to the libc++abi repository. For context, see the proposal and discussion here: http://lists.llvm.org/pipermail/cfe-dev/2017-November/056032.html Similar to D40500, I set up a new Diffusion repository with callsign "CXXA" for libc++abi: https://reviews.llvm.org/source/libcxxabi/ This explicitly updates libcxxabi's .arcconfig to point to the new CXX repository in Diffusion, which will let us use Herald rule H268. Reviewers: phosek, beanz, EricWF, compnerd Reviewed By: phosek Subscribers: cfe-commits, klimek, sammccall, dlj, bkramer Differential Revision: https://reviews.llvm.org/D40501 llvm-svn: 319713
* [libc++abi] Add install-cxxabi-stripped targetShoaib Meenai2017-11-301-0/+6
| | | | | | | | | | | | LLVM is gaining install-*-stripped targets to perform stripped installs, and in order for this to be useful for install-distribution, all potential distribution components should have stripped installation targets. LLVM has a function to create these install targets, but since we can't use LLVM CMake functions in libc++abi, let's do it manually. Differential Revision: https://reviews.llvm.org/D40681 llvm-svn: 319499
* Insert padding before the __cxa_exception header to ensure the thrownAkira Hatanaka2017-11-282-26/+36
| | | | | | | | | | | | | | | | | | | | object is sufficiently aligned. r303175 annotated field unwindHeader of __cxa_exception with attribute 'aligned' to ensure the thrown object following the __cxa_exception header was sufficiently aligned. This caused changes in the field offsets of __cxa_exception relative to the start of the thrown object, which was an ABI breaking change for some clients. Instead of annotating field unwindHeader, this commit inserts extra space before the header. This ensures the thrown object following the header is sufficiently aligned without changing the field offsets, thus avoiding any ABI breakages. rdar://problem/25364625 rdar://problem/35556163 llvm-svn: 319123
* [demangler] Support for abi_tag attributeErik Pilkington2017-11-222-16/+82
| | | | | | Differential revision: https://reviews.llvm.org/D40279 llvm-svn: 318874
* [demangler] Document some features that the demangler doesn't yet support, NFCErik Pilkington2017-11-212-2/+39
| | | | llvm-svn: 318765
* [libcxxabi][CMake] Provide option to disable installing of the libraryPetr Hosek2017-11-172-5/+8
| | | | | | | | | | | This is useful in cases where we only build static library and libc++abi.a is combined with libc++.a into a single archive in which case we don't want to have libc++abi.a installed separately. The same option is already provided by libcxx CMake build. Differential Revision: https://reviews.llvm.org/D40194 llvm-svn: 318568
* [CMake][libcxxabi] Support merging objects when statically linking unwinderPetr Hosek2017-11-171-1/+7
| | | | | | | | | | | | | When using LLVM unwinder and static unwinder option is set, merge libunwind and libc++abi objects into a single archive. libc++ already supports merging libc++abi.a and libc++.a into a single archive; with this change, it is possible to also include libunwind.a in the same archive which is useful when doing static link and using libc++ as a default C++ library and compiler-rt as a default runtime library. Differential Revision: https://reviews.llvm.org/D39949 llvm-svn: 318563
* Remove excess whitespace from syslog message; NFCStephan Bergmann2017-11-131-2/+2
| | | | llvm-svn: 318043
* 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
OpenPOWER on IntegriCloud