summaryrefslogtreecommitdiffstats
path: root/libcxxabi/src
Commit message (Collapse)AuthorAgeFilesLines
...
* [demangler] Fix a bug in r328464 found by oss-fuzz.Erik Pilkington2018-03-261-2/+27
| | | | llvm-svn: 328507
* [demangler] Use a back-patching scheme to resolve forward references.Erik Pilkington2018-03-251-40/+79
| | | | | | | | | | | | | | | Strictly in a conversion operator's type, a <template-param> refers to a <template-arg> that is further ahead in the mangled name. Instead of doing a second parse to resolve these, introduce a ForwardTemplateReference Node and back-patch the referenced <template-arg> when we're in the right context. This is also a correctness fix, previously we would only do a second parse if the <template-param> was out of bounds in the current set of <template-args>. This lead to misdemangles (gasp!) when the conversion operator was a member of a templated struct, for instance. llvm-svn: 328464
* [demangler] Tweak how parameter pack sizes are determined.Erik Pilkington2018-03-251-210/+105
| | | | | | | | Rather than eagerly propagating up parameter pack sizes in Node ctors, find the parameter pack size during printing. This is being done to support back-patching forward referencing <template-param>s. llvm-svn: 328463
* [demangler] Support for clang's enable_if attribute.Erik Pilkington2018-03-251-6/+35
| | | | | | Fixes PR33569. llvm-svn: 328462
* [demangler] Support for <template-param>s in generic lambdas.Erik Pilkington2018-03-161-12/+14
| | | | | | | These <template-param>s refer to "artifical" <template-arg>s that don't appear in the mangled name, so we just print them as "auto". llvm-svn: 327690
* [demangler] Simplify printing of structured bindings.Erik Pilkington2018-03-101-1/+1
| | | | | | Thanks to Richard Smith for the post-commit review! llvm-svn: 327228
* [demangler] Support for sequence numbers on lifetime extended temporaries.Erik Pilkington2018-03-101-0/+8
| | | | llvm-svn: 327227
* [demangler] Support for structured bindings.Erik Pilkington2018-03-101-3/+26
| | | | llvm-svn: 327226
* [demangler] Fix a mistake in r326797.Erik Pilkington2018-03-071-2/+2
| | | | | | Thanks to Nico Weber for pointing this out! llvm-svn: 326871
* [demangler] Modernize the rest of the demangler.Erik Pilkington2018-03-061-458/+287
| | | | llvm-svn: 326797
* [demangler] Modernize parse_unresolved_name.Erik Pilkington2018-03-061-403/+177
| | | | llvm-svn: 326796
* [demangler] Modernize parse_name.Erik Pilkington2018-03-051-1238/+727
| | | | llvm-svn: 326717
* [demangler] Support for exception specifications on function types.Erik Pilkington2018-02-141-4/+80
| | | | llvm-svn: 325093
* [demangler] Simplify the AST for function types, NFC.Erik Pilkington2018-02-141-92/+66
| | | | llvm-svn: 325092
* [demangler] Support for inheriting constructors.Erik Pilkington2018-02-131-0/+5
| | | | | | Fixes PR33223. llvm-svn: 325023
* [demangler] Rewrite parse_nested_name in the new style.Erik Pilkington2018-02-131-280/+206
| | | | llvm-svn: 325022
* [demangler] Support for initializer lists and designated initializers.Erik Pilkington2018-02-131-2/+142
| | | | llvm-svn: 324970
* [demangler] Support for dependent elaborate type specifiers.Erik Pilkington2018-02-131-2/+39
| | | | llvm-svn: 324969
* [demangler] All <qualifiers> on one type should share one entry in the ↵Erik Pilkington2018-02-131-45/+51
| | | | | | | | substitution table. Previously, both <extended-qualifier>s and <CV-qualifiers> got their own entries. llvm-svn: 324968
* Fix compilation in C++17 mode.Richard Smith2018-02-071-0/+2
| | | | | | | | | | | C++17 removes `std::unexpected_handler`, but libc++abi needs it to define `__cxa_exception`. When building against libc++, this is easily rectified by telling libc++ we're building the library. We already do this in the other places where we need these symbols. Differential Revision: https://reviews.llvm.org/D42987 llvm-svn: 324542
* [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-021-1441/+843
| | | | | | | | | | | | | | | | 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-311-376/+585
| | | | | | | | | | | | | | 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
* [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-221-16/+76
| | | | | | Differential revision: https://reviews.llvm.org/D40279 llvm-svn: 318874
* [demangler] Document some features that the demangler doesn't yet support, NFCErik Pilkington2017-11-211-0/+6
| | | | llvm-svn: 318765
* [libcxxabi][CMake] Provide option to disable installing of the libraryPetr Hosek2017-11-171-5/+7
| | | | | | | | | | | 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
* [demangler] Improve representation of substitutions/templatesErik Pilkington2017-08-091-190/+264
| | | | | | 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-061-1/+1
| | | | llvm-svn: 310226
* [demangler] Fix another bug found by oss-fuzz in r309340Erik Pilkington2017-08-011-0/+2
| | | | llvm-svn: 309650
OpenPOWER on IntegriCloud