summaryrefslogtreecommitdiffstats
path: root/libcxxabi
Commit message (Collapse)AuthorAgeFilesLines
...
* [demangler] call terminate() if allocation failedErik Pilkington2018-07-232-4/+17
| | | | | | | | | | We really should set *status to memory_alloc_failure, but we need to refactor the demangler a bit to properly propagate the failure up the stack. Until then, its better to explicitly terminate then rely on a null dereference crash. rdar://31240372 llvm-svn: 337759
* Implement a GCC compatible SEH unwinding personality, __gxx_personality_seh0Martin Storsjo2018-07-231-0/+25
| | | | | | | | | This allows handling SEH based exceptions, with unwind functions provided by libgcc. Differential Revision: https://reviews.llvm.org/D49638 llvm-svn: 337754
* Revert "[CMake] Support statically linking dependencies only to shared or ↵Petr Hosek2018-07-232-24/+9
| | | | | | | | static library" This reverts commit r337668: broke the cxxabi build when using Make. llvm-svn: 337670
* [CMake] Support statically linking dependencies only to shared or static libraryPetr Hosek2018-07-232-9/+24
| | | | | | | | | | | | | | Currently it's possible to select whether to statically link unwinder or the C++ ABI library, but this option applies to both the shared and static library. However, in some scenarios it may be desirable to only statically link unwinder and C++ ABI library into static C++ library since for shared C++ library we can rely on dynamic linking and linker scripts. This change enables selectively enabling or disabling statically linking only to shared or static library. Differential Revision: https://reviews.llvm.org/D49502 llvm-svn: 337668
* Add GCC 9 to XFAILs list for testEric Fiselier2018-07-221-1/+1
| | | | llvm-svn: 337662
* Merge changes to ItaniumDemangle over to libcxxabi.Zachary Turner2018-07-204-155/+343
| | | | | | | | | | | ItaniumDemangle had a small NFC refactor to make some of its code reusable by the newly added Microsoft demangler. To keep the libcxxabi demangler as close as possible to the master copy this refactor is being merged over. Differential Revision: https://reviews.llvm.org/D49575 llvm-svn: 337582
* [CMake] Set per-runtime library directory suffix in runtimes buildPetr Hosek2018-07-101-1/+1
| | | | | | | | | | | | Do not use LLVM_RUNTIMES_LIBDIR_SUFFIX variable which is an internal variable used by the runtimes build from individual runtimes, instead set per-runtime librarhy directory suffix variable which is necessary for the sanitized runtimes build to install libraries into correct location. Differential Revision: https://reviews.llvm.org/D49121 llvm-svn: 336713
* [demangler] Avoid alignment warningSerge Pavlov2018-07-051-1/+1
| | | | | | | | | | | | | | The alignment specified by a constant for the field `BumpPointerAllocator::InitialBuffer` exceeded the alignment guaranteed by `malloc` and `new` on Windows. This change set the alignment value to that of `long double`, which is defined by the used platform. It fixes https://bugs.llvm.org/show_bug.cgi?id=37944. Differential Revision: https://reviews.llvm.org/D48889 llvm-svn: 336312
* Revert r336159, r336157. Some bots failed on qualified std::max_align_t, and ↵Erik Pilkington2018-07-031-2/+1
| | | | | | | | | | | other on unqualified max_align_t. I'll take another stab at this tomorrow. Any ideas for fixing this would be appreciated! http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/23071/steps/build_Lld/logs/stdio http://lab.llvm.org:8011/builders/clang-with-thin-lto-ubuntu/builds/11185/steps/build-stage1-compiler/logs/stdio llvm-svn: 336162
* Some buildbots were choking on std::max_align_t, try using the global alias.Erik Pilkington2018-07-031-1/+1
| | | | llvm-svn: 336159
* [demangler] Fix a MSVC alignment warning.Erik Pilkington2018-07-031-1/+2
| | | | | | This should fix llvm.org/PR37944 llvm-svn: 336157
* [libc++abi] Look for __config instead of vectorShoaib Meenai2018-06-301-1/+1
| | | | | | | | | | | | | | | | vector is a generic C++ header, whereas __config is libc++-specific, so we can look for it instead to guarantee we're finding a libc++ installation. This was suggested by Eric in https://reviews.llvm.org/D48694. This is less important now that we're limiting the header search to the specified directories (which definitely shouldn't have any other C++ library's headers anyway), but it shouldn't hurt either. There's a chance some other library could also be providing a __config header, so there's still a trade-off there. It would be ideal if we could check for the presence of both __config and vector in the same directory, but there doesn't seem to be any easy way to do that in CMake. llvm-svn: 336034
* [libc++abi] Limit libc++ header search to specified pathsShoaib Meenai2018-06-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Right now, when libc++abi is locating libc++ headers, it specifies several search locations, but it also doesn't prevent CMake from looking for those headers in system directories. I don't know if this was intentional or an oversight, but it has several issues: * We're looking specifically for the vector header, which could just as easily be found in a libstdc++ (or other C++ library) installation. * No system I know of places their C++ headers directly in system include directories (they're always under a C++ subdirectory), so the system search will never succeed. * find_path searches system paths before the user-specified PATHS, so if some system does happen to have C++ headers in its system include directories, those headers will be preferred, which doesn't seem desirable. It makes sense to me to limit this header search to the explicitly specified paths (using NO_DEFAULT_PATH, as is done for the other find_path call in this file), but I'm putting it up for review in case there's some use case I'm not thinking of. Differential Revision: https://reviews.llvm.org/D48694 llvm-svn: 336032
* Support for multiarch runtimes layoutPetr Hosek2018-06-281-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | This change adds a support for multiarch style runtimes layout, so in addition to the existing layout where runtimes get installed to: lib/clang/$version/lib/$os Clang now allows runtimes to be installed to: lib/clang/$version/$target/lib This also includes libc++, libc++abi and libunwind; today those are assumed to be in Clang library directory built for host, with the new layout it is possible to install libc++, libc++abi and libunwind into the runtime directory built for different targets. The use of new layout is enabled by setting the LLVM_ENABLE_RUNTIME_TARGET_DIR CMake variable and is supported by both projects and runtimes layouts. The runtimes CMake build has been further modified to use the new layout when building runtimes for multiple targets. Differential Revision: https://reviews.llvm.org/D45604 llvm-svn: 335809
* [CMake] Convert paths to the right form in standalone builds on WindowsMartin Storsjo2018-06-202-3/+7
| | | | | | | | | | | | | The paths output from llvm-config --cmakedir and from clang --print-libgcc-file-name can contain backslashes, while CMake can't handle the paths in this form. This matches what compiler-rt already does (since SVN r203789 and r293195). Differential Revision: https://reviews.llvm.org/D48355 llvm-svn: 335171
* Update copyright year to 2018.Paul Robinson2018-06-181-1/+1
| | | | llvm-svn: 334936
* Fix libcxxabi tests after clang r334924Vitaly Buka2018-06-181-1/+1
| | | | llvm-svn: 334926
* Fix libcxx tests after clang r334677.Vitaly Buka2018-06-181-1/+2
| | | | llvm-svn: 334924
* private_typeinfo: limit is_dst_type_derived_from_static_type optimizationEric Fiselier2018-05-182-32/+84
| | | | | | | | | | | | | | | | Patch by Ryan Prichard If the destination type does not derive from the static type, we can skip the search_above_dst call, but we still need to run the !does_dst_type_point_to_our_static_type block of code. That block of code will increment info->number_to_dst_ptr to 2, and because dest isn't derived from static, the cast will ultimately fail. Fixes PR33439 Reviewed as https://reviews.llvm.org/D36447 llvm-svn: 332767
* private_typeinfo: propagate static flags in vmi search_above_dst methodEric Fiselier2018-05-181-0/+103
| | | | | | | | | | | | | | | This adds the test which was mistakenly not committed in r332763. Patch by Ryan Prichard Propagate the found_our_static_ptr and found_any_static_type flags from __vmi_class_type_info::search_above_dst to its caller. Fixes PR33425 and PR33487 Reviewed as https://reviews.llvm.org/D36446 llvm-svn: 332764
* private_typeinfo: propagate static flags in vmi search_above_dst methodEric Fiselier2018-05-181-0/+4
| | | | | | | | | | | | | Patch by Ryan Prichard Propagate the found_our_static_ptr and found_any_static_type flags from __vmi_class_type_info::search_above_dst to its caller. Fixes PR33425 and PR33487 Reviewed as https://reviews.llvm.org/D36446 llvm-svn: 332763
* Fix test failure for missing _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONSNico Weber2018-05-031-1/+4
| | | | | | | | | | This is a follow-up change to r331150. The CL moved the macro from individual file to build file, but the macro is missed in a test config file. https://reviews.llvm.org/D46385 Patch from Taiju Tsuiki <tzik@chromium.org>! llvm-svn: 331450
* Move _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS macro to build systemNico Weber2018-04-293-7/+4
| | | | | | | | | | | | | | | _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS is currently used to bring back std::unexpected, which is removed in C++17, but still needed for libc++abi for backward compatibility. This macro used to define in cxa_exception.cpp only, but actually needed for all sources that touches exceptions. So, a build-system-level macro is better fit to define this macro. https://reviews.llvm.org/D46056 Patch from Taiju Tsuiku <tzik@chromium.org>! llvm-svn: 331150
* [libc++abi] Replace __sync_* functions with __libcpp_atomic_* functions.Eli Friedman2018-04-165-35/+199
| | | | | | | | | | | This is basically part 2 of r313694. It's a little unfortunate that I had to copy-paste atomic_support.h, but I don't really see any alternative. The refstring.h changes are the same as the libcxx changes in r313694. llvm-svn: 330162
* [demangler] NFC: Some refactoring to support partial demangling.Erik Pilkington2018-04-121-42/+97
| | | | | | | I'm committing this to libcxxabi too so that the two demanglers remain as simular as possible. llvm-svn: 329950
* [CFI] Disable CFI checks for __cxa_decrement_exception_refcountVlad Tsyrklevich2018-04-092-2/+12
| | | | | | | | | | | | | | | | | Summary: exception_header->exceptionDestructor is a void(*)(void*) function pointer; however, it can point to destructors like std:: exception::~exception that don't match that type signature. Reviewers: pcc, vitalybuka Reviewed By: vitalybuka Subscribers: kcc, christof, cfe-commits Differential Revision: https://reviews.llvm.org/D45455 llvm-svn: 329629
* [demangler] Support for fold expressions.Erik Pilkington2018-04-092-3/+132
| | | | llvm-svn: 329601
* [demangler] Support for <data-member-prefix>.Erik Pilkington2018-04-092-0/+12
| | | | llvm-svn: 329600
* [demangler] Support for partially substituted sizeof....Erik Pilkington2018-04-092-1/+26
| | | | llvm-svn: 329599
* [CMake] Support for monorepo layoutPetr Hosek2018-04-041-0/+2
| | | | | | | | Support finding libcxx and libunwind sources in monorepo style layout. Differential Revision: https://reviews.llvm.org/D45269 llvm-svn: 329208
* [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-252-42/+87
| | | | | | | | | | | | | | | 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-252-217/+115
| | | | | | | | 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-252-7/+40
| | | | | | Fixes PR33569. llvm-svn: 328462
* [demangler] Support for <template-param>s in generic lambdas.Erik Pilkington2018-03-162-13/+17
| | | | | | | 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-102-4/+4
| | | | | | Thanks to Richard Smith for the post-commit review! llvm-svn: 327228
* [demangler] Support for sequence numbers on lifetime extended temporaries.Erik Pilkington2018-03-102-0/+11
| | | | llvm-svn: 327227
* [demangler] Support for structured bindings.Erik Pilkington2018-03-102-4/+30
| | | | llvm-svn: 327226
* [demangler] Fix a mistake in r326797.Erik Pilkington2018-03-072-2/+4
| | | | | | Thanks to Nico Weber for pointing this out! llvm-svn: 326871
* [demangler] Modernize the rest of the demangler.Erik Pilkington2018-03-062-458/+290
| | | | llvm-svn: 326797
* [demangler] Modernize parse_unresolved_name.Erik Pilkington2018-03-061-403/+177
| | | | llvm-svn: 326796
* [demangler] Modernize parse_name.Erik Pilkington2018-03-052-1238/+730
| | | | llvm-svn: 326717
* [demangler] Support for exception specifications on function types.Erik Pilkington2018-02-142-4/+96
| | | | 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-132-0/+9
| | | | | | 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-132-29/+169
| | | | llvm-svn: 324970
* [demangler] Support for dependent elaborate type specifiers.Erik Pilkington2018-02-132-3/+44
| | | | llvm-svn: 324969
* [demangler] All <qualifiers> on one type should share one entry in the ↵Erik Pilkington2018-02-132-45/+54
| | | | | | | | 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
OpenPOWER on IntegriCloud