aboutsummaryrefslogtreecommitdiff
path: root/libcxxabi
AgeCommit message (Collapse)Author
2019-01-15Update year in license filesHans Wennborg
In last year's update (D48219) it was suggested that the release manager might want to do this, so here we go. llvm-svn: 351194
2018-11-29[libcxx] Remove bad_array_lengthLouis Dionne
Summary: std::bad_array_length was added by n3467, but this never made it into C++. This commit removes the definition of std::bad_array_length from the headers AND from the shared library. See the comments in the ABI changelog for details about the ABI implications of this change. Reviewers: mclow.lists, dexonsmith, howard.hinnant, EricWF Subscribers: christof, jkorous, libcxx-commits Differential Revision: https://reviews.llvm.org/D54804 llvm-svn: 347903
2018-11-27[Demangle] remove itaniumFindTypesInMangledNamePavel Labath
Summary: This (very specialized) function was added to enable an LLDB use case. Now that a more generic interface (overriding of parser functions - D52992) is available, and LLDB has been converted to use that (D54074), the function is unused and can be removed. Reviewers: erik.pilkington, sgraenitz, rsmith Subscribers: mgorny, hiraditya, christof, libcxx-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D54893 llvm-svn: 347670
2018-11-14[CMake] Passthrough CFLAGS when checking the compiler-rt pathPetr Hosek
This is needed when cross-compiling for a different target since CFLAGS may contain additional flags like -resource-dir which change the location in which compiler-rt builtins are found. Differential Revision: https://reviews.llvm.org/D54371 llvm-svn: 346820
2018-11-11Port LLVM r346606 to libcxxabi.Nico Weber
llvm-svn: 346607
2018-11-01Use C++11 fallthrough attribute syntax when available and add a breakReid Kleckner
Summary: This silences the two -Wimplicit-fallthrough warnings clang finds in ItaniumDemangle.h in libc++abi. Clang does not have a GNU attribute spelling for this attribute, so this is necessary. I will commit the same change to the LLVM demangler soon. Reviewers: EricWF, ldionne Subscribers: christof, erik.pilkington, cfe-commits Differential Revision: https://reviews.llvm.org/D53985 llvm-svn: 345870
2018-10-29[libc++abi] Provide __cxa_thread_atexit on FuchsiaPetr Hosek
Fuchsia already supports this interface. Differential Revision: https://reviews.llvm.org/D53801 llvm-svn: 345534
2018-10-16cxa_demangle: make demangler's parsing functions overridablePavel Labath
Summary: This uses CRTP (for performance reasons) to allow a user the override demangler functions to implement custom parsing logic. The motivation for this is LLDB, which needs to occasionaly modify the mangled names. One such instance is already implemented via the TypeCallback member, but this is very specific functionality which does not help with any other use case. Currently we have a use case for modifying the constructor flavours, which would require adding another callback. This approach does not scale. With CRTP, the user (LLDB) can override any function it needs without any special support from the demangler library. After LLDB is ported to use this instead of the TypeCallback mechanism, the callback can be removed. More context can be found in D50599. Reviewers: erik.pilkington, rsmith Subscribers: christof, ldionne, llvm-commits, libcxx-commits Differential Revision: https://reviews.llvm.org/D52992 llvm-svn: 344607
2018-10-15NFC: Fix a -Wsign-conversion warningErik Pilkington
llvm-svn: 344564
2018-10-11Override libcxxabi's .clang-format in the demangle directoryErik Pilkington
This directory uses LLVM style. llvm-svn: 344316
2018-10-11Use C++03 friendly version of alignofEric Fiselier
llvm-svn: 344215
2018-10-11Update libc++abi's detection of aligned allocation after r344207.Eric Fiselier
llvm-svn: 344208
2018-10-10[libcxxabi] Allow building with sanitizers enabledLouis Dionne
Summary: I copied the sanitizer-related logic in libcxx/lib/CMakeLists.txt. In the future, it would be great to avoid duplicating this logic in the compiler, libc++ and libc++abi. Reviewers: EricWF Subscribers: mgorny, christof, dexonsmith, libcxx-commits, davide Differential Revision: https://reviews.llvm.org/D53028 llvm-svn: 344191
2018-10-10Blind attempt to fix linker errors when building libc++abit w/o exceptions.Marshall Clow
llvm-svn: 344156
2018-10-10Make libc++abi work better with gcc's ARM unwind library. Reviewed as ↵Marshall Clow
https://reviews.llvm.org/D42242 llvm-svn: 344152
2018-10-10Port llvm r342166 to libcxxabi demanglerPavel Labath
Summary: This was committed back in september (D51463), but it seems it never made it into the libcxxabi copy. The original commit message was: The hash computed for an ArrayType was different when first constructed versus when later profiled due to the constructor default argument, and we were not tracking constructor / destructor variant as part of the mangled name AST, leading to incorrect equivalences. Reviewers: erik.pilkington, rsmith, EricWF Subscribers: christof, ldionne, libcxx-commits Differential Revision: https://reviews.llvm.org/D53063 llvm-svn: 344121
2018-10-09[NFC][unwind] Improve error message when a type has more than one RTTIsLouis Dionne
The "dynamic_cast error 2" error can apparently happen when the same type (with RTTI) is defined in more than one translation unit, and those translation units are linked together. This is technically an ODR violation, but making the error message more obvious is still helpful. llvm-svn: 344052
2018-09-22Update docs to reference new libc++ mailing lists.Eric Fiselier
llvm-svn: 342817
2018-09-22Fix incorrectly aligned exceptions in 32 bit builds.Eric Fiselier
This patch fixes a bug where exceptions in 32 bit builds would be incorrectly aligned because malloc only provides 8 byte aligned memory where 16 byte alignment is needed. This patch makes libc++abi correctly use posix_memalign when it's available. This requires defining _LIBCPP_BUILDING_LIBRARY so that libc++ only defines _LIBCPP_HAS_NO_ALIGNED_ALLOCATION when libc doesn't support it and not when aligned new/delete are disable for other reasons. This bug somehow made it into the 7.0 release, making it a regression. Therefore this patch should be included in the next dot release. llvm-svn: 342815
2018-09-21[libc++abi] is_strcmp parameter to is_equal is unused for WIN32Pirama Arumuga Nainar
Summary: Mark it as unused to avoid -Wunused-parameter. Reviewers: EricWF, srhines, mstorsjo Subscribers: christof, ldionne, libcxx-commits, cfe-commits Differential Revision: https://reviews.llvm.org/D52368 llvm-svn: 342764
2018-09-20add a quick link to libc++Sylvestre Ledru
llvm-svn: 342627
2018-09-15Merge Demangle change in r342330 to libcxxabi.Nico Weber
Differential Revision: https://reviews.llvm.org/D52104 llvm-svn: 342331
2018-08-24Port my recent changes from LLVM copy of the demangler:Richard Smith
r340663 - Allow Allocator::make to make a node of a different type than that requested. r340664 - Add documentation comment to ForwardTemplateReference. r340665 - Fix ExpandedSpecialSubstitution demangling for Sa and Sb. r340670 - Allow demangler's node allocator to fail, and bail out of the entire demangling process when it does. llvm-svn: 340671
2018-08-20Port LLVM r340203 (and r340205) to libcxxabi.Richard Smith
Move Itanium demangler implementation into a header file and add visitation support. Summary: This transforms the Itanium demangler into a generic reusable library that can be used to build, traverse, and transform Itanium mangled name trees. This is in preparation for adding a canonicalizing demangler, which cannot live in the Demangle library for layering reasons. In order to keep the diffs simpler, this patch moves more code to the new header than is strictly necessary: in particular, all of the printLeft / printRight implementations can be moved to the implementation file. (And indeed we could make them non-virtual now if we wished, and remove the vptr from Node.) All nodes are now included in the Kind enumeration, rather than omitting some of the Expr nodes, and the three different floating-point literal node types now have distinct Kind values. As a proof of concept for the visitation / matching mechanism, this patch implements a Node dumping facility on top of it, replacing the prior mechanism that produced the pretty-printed output rather than a tree dump. Sample dump output: FunctionEncoding( NameType("int"), NameWithTemplateArgs( NestedName( NameWithTemplateArgs( NameType("A"), TemplateArgs( {NameType("B")})), NameType("f")), TemplateArgs( {NameType("int")})), {}, <null>, QualConst, FunctionRefQual::FrefQualLValue) As a next step, it would make sense to move the LLVM high-level interface to the demangler (the itaniumDemangler function and ItaniumPartialDemangler class) into the Support library, and implement them in terms of the Demangle library. This would allow the libc++abi demangler implementation to be an identical copy of the llvm Demangle library, and would allow the LLVM implementation to reuse LLVM components such as llvm::BumpPtrAllocator, but we'll need to decide how to coordinate that with the MS ABI demangler, so I'm not doing that in this patch. No functionality change intended other than the behavior of dump(). Reviewers: erik.pilkington, zturner, chandlerc, dlj Subscribers: aheejin, llvm-commits Differential Revision: https://reviews.llvm.org/D50930 llvm-svn: 340207
2018-08-16Factor Node creation out of the demangler. No functionality change intended.Richard Smith
(This is a port of llvm r339944 to libcxxabi.) llvm-svn: 339952
2018-08-16[libcxxabi] Fix test_exception_address_alignment test for ARMYvan Roux
Check _LIBCXXABI_ARM_EHABI macro instead of libunwind version. Fixes PR34182 Differential revision: https://reviews.llvm.org/D50170 llvm-svn: 339865
2018-08-13[itanium demangler] Add llvm::itaniumFindTypesInMangledName()Erik Pilkington
This function calls a callback whenever a <type> is parsed. This is necessary to implement FindAlternateFunctionManglings in LLDB, which uses a similar hack in FastDemangle. Once that function has been updated to use this version, FastDemangle can finally be removed. Differential revision: https://reviews.llvm.org/D50586 llvm-svn: 339580
2018-08-11Add missing _LIBCXXABI_FUNC_VIS to __gxx_personality_seh0Martin Storsjo
This was missed in SVN r337754. llvm-svn: 339503
2018-08-02[itanium demangler] Support dot suffixes on block invocation functionsErik Pilkington
rdar://32378759 llvm-svn: 338747
2018-08-01Update version to 8.0.0svnHans Wennborg
llvm-svn: 338564
2018-08-01[libc++] Remove _LIBCPP_BUILDING_XXX macros, which are redundant since ↵Louis Dionne
_LIBCPP_BUILDING_LIBRARY Summary: As suggested by Marshall in https://reviews.llvm.org/D49914 Reviewers: mclow.lists, EricWF Subscribers: christof, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D50008 llvm-svn: 338475
2018-07-28[demangler] Fix an oss-fuzz bug from r338138Erik Pilkington
Stack overflow on invalid. While collapsing references, we were skipping over a cycle check in ForwardTemplateReference leading to a stack overflow. This commit fixes the problem by duplicating the cycle check in ReferenceType. llvm-svn: 338190
2018-07-27[demangler] Support for reference collapsingErik Pilkington
llvm.org/PR38323 llvm-svn: 338138
2018-07-25[CMake] Don't use LIBCXXABI_ENABLE_STATIC option before its declaredSam Clegg
Summary: rL337867 introduced two new cmake_dependent_option options: - LIBCXXABI_INSTALL_STATIC_LIBRARY - LIBCXXABI_INSTALL_SHARED_LIBRARY They depend on LIBCXXABI_ENABLE_STATIC and LIBCXXABI_ENABLE_SHARED and so therefore need to (it seems) come after the declaration of these two options. Subscribers: mgorny, aheejin, christof, ldionne, cfe-commits Differential Revision: https://reviews.llvm.org/D49825 llvm-svn: 337982
2018-07-25[CMake] Use LIBCXXABI_LIBDIR_SUFFIX in libc++abi buildPetr Hosek
This was changed unintentionally in r335809. Differential Revision: https://reviews.llvm.org/D49765 llvm-svn: 337937
2018-07-25Fix dangling reference in testEric Fiselier
llvm-svn: 337906
2018-07-24[CMake] Option to control whether shared/static library is installedPetr Hosek
Currently it's only possible to control whether shared or static library build of libc++, libc++abi and libunwind is enabled or disabled and whether to install everything we've built or not. However, it'd be useful to have more fine grained control, e.g. when static libraries are merged together into libc++.a we don't need to install libc++abi.a and libunwind.a. This change adds this option. Differential Revision: https://reviews.llvm.org/D49573 llvm-svn: 337867
2018-07-24Reland "[CMake] Support statically linking dependencies only to shared or ↵Petr Hosek
static library" This is a reland of commit r337668. llvm-svn: 337814
2018-07-23[demangler] call terminate() if allocation failedErik Pilkington
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
2018-07-23Implement a GCC compatible SEH unwinding personality, __gxx_personality_seh0Martin Storsjo
This allows handling SEH based exceptions, with unwind functions provided by libgcc. Differential Revision: https://reviews.llvm.org/D49638 llvm-svn: 337754
2018-07-23Revert "[CMake] Support statically linking dependencies only to shared or ↵Petr Hosek
static library" This reverts commit r337668: broke the cxxabi build when using Make. llvm-svn: 337670
2018-07-23[CMake] Support statically linking dependencies only to shared or static libraryPetr Hosek
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
2018-07-22Add GCC 9 to XFAILs list for testEric Fiselier
llvm-svn: 337662
2018-07-20Merge changes to ItaniumDemangle over to libcxxabi.Zachary Turner
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
2018-07-10[CMake] Set per-runtime library directory suffix in runtimes buildPetr Hosek
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
2018-07-05[demangler] Avoid alignment warningSerge Pavlov
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
2018-07-03Revert r336159, r336157. Some bots failed on qualified std::max_align_t, and ↵Erik Pilkington
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
2018-07-03Some buildbots were choking on std::max_align_t, try using the global alias.Erik Pilkington
llvm-svn: 336159
2018-07-03[demangler] Fix a MSVC alignment warning.Erik Pilkington
This should fix llvm.org/PR37944 llvm-svn: 336157
2018-06-30[libc++abi] Look for __config instead of vectorShoaib Meenai
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