summaryrefslogtreecommitdiffstats
path: root/libcxxabi
Commit message (Collapse)AuthorAgeFilesLines
...
* [CMake] Use __libc_start_main rather than fopen when checking for C libraryPetr Hosek2019-01-281-1/+1
| | | | | | | | | | | | | | | | | | The check_library_exists CMake uses a custom symbol definition. This is a problem when checking for C library symbols because Clang recognizes many of them as builtins, and returns the -Wbuiltin-requires-header (or -Wincompatible-library-redeclaration) error. When building with -Werror which is the default, this causes the check_library_exists check fail making the build think that C library isn't available. To avoid this issue, we should use a symbol that isn't recognized by Clang and wouldn't cause the same issue. __libc_start_main seems like reasonable choice that fits the bill. Differential Revision: https://reviews.llvm.org/D57142 llvm-svn: 352341
* [libcxxabi] Support building hermetic static libraryPetr Hosek2019-01-243-16/+70
| | | | | | | | | | | | This is useful when the static libc++abi library is being linked into shared libraries that may be used in with other shared libraries that use different C++ library. We want to avoid avoid exporting libc++abi or libc++ symbols in those cases. This achieved by a new CMake option which can be enabled by libc++abi vendors as needed. Differential Revision: https://reviews.llvm.org/D56026 llvm-svn: 352017
* Enable LLVM_ENABLE_WARNINGS when building standalone out of treeMartin Storsjo2019-01-221-0/+2
| | | | | | | | | When built within the llvm runtimes directory, the runtimes CMakeLists.txt adds the same. Differential Revision: https://reviews.llvm.org/D56979 llvm-svn: 351873
* Fix typos throughout the license files that somehow I and my reviewersChandler Carruth2019-01-211-1/+1
| | | | | | | | | | | all missed! Thanks to Alex Bradbury for pointing this out, and the fact that I never added the intended `legacy` anchor to the developer policy. Add that anchor too. With hope, this will cause the links to all resolve successfully. llvm-svn: 351731
* Update more file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-1988-352/+264
| | | | | | | | | | | | | | | | | | to reflect the new license. These used slightly different spellings that defeated my regular expressions. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351648
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-194-16/+12
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Remove unnecesasry comment markers.Chandler Carruth2019-01-191-8/+8
| | | | llvm-svn: 351635
* Install new LLVM license structure and new developer policy.Chandler Carruth2019-01-191-1/+236
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This installs the new developer policy and moves all of the license files across all LLVM projects in the monorepo to the new license structure. The remaining projects will be moved independently. Note that I've left odd formatting and other idiosyncracies of the legacy license structure text alone to make the diff easier to read. Critically, note that we do not in any case *remove* the old license notice or terms, as that remains necessary until we finish the relicensing process. I've updated a few license files that refer to the LLVM license to instead simply refer generically to whatever license the LLVM project is under, basically trying to minimize confusion. This is really the culmination of so many people. Chris led the community discussions, drafted the policy update and organized the multi-year string of meeting between lawyers across the community to figure out the strategy. Numerous lawyers at companies in the community spent their time figuring out initial answers, and then the Foundation's lawyer Heather Meeker has done *so* much to help refine and get us ready here. I could keep going on, but I just want to make sure everyone realizes what a huge community effort this has been from the begining. Differential Revision: https://reviews.llvm.org/D56897 llvm-svn: 351631
* [demangler] Support for block literals.Erik Pilkington2019-01-172-0/+8
| | | | llvm-svn: 351482
* [demangler] Ignore leading underscores if presentErik Pilkington2019-01-172-2/+6
| | | | | | | On MacOS, symbols start with a leading underscore, so just parse and ignore it if present. llvm-svn: 351481
* NFC: Make the copies of the demangler byte-for-byte identicalErik Pilkington2019-01-177-36/+147
| | | | | | | | | | | | | | With this patch, the copies of the files ItaniumDemangle.h, StringView.h, and Utility.h are kept byte-for-byte in sync between libcxxabi and llvm. All differences (namespaces, fallthrough, and unreachable macros) are defined in each copies' DemanglerConfig.h. This patch also adds a script to copy changes from libcxxabi (cp-to-llvm.sh), and a README.txt explaining the situation. Differential revision: https://reviews.llvm.org/D53538 llvm-svn: 351474
* Found another version number to increase from 8 to 9Hans Wennborg2019-01-161-1/+1
| | | | llvm-svn: 351341
* Update year in license filesHans Wennborg2019-01-151-1/+1
| | | | | | | 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
* [libcxx] Remove bad_array_lengthLouis Dionne2018-11-291-30/+0
| | | | | | | | | | | | | | | | 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
* [Demangle] remove itaniumFindTypesInMangledNamePavel Labath2018-11-271-6/+0
| | | | | | | | | | | | | | | | 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
* [CMake] Passthrough CFLAGS when checking the compiler-rt pathPetr Hosek2018-11-141-0/+3
| | | | | | | | | | 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
* Port LLVM r346606 to libcxxabi.Nico Weber2018-11-112-3/+3
| | | | llvm-svn: 346607
* Use C++11 fallthrough attribute syntax when available and add a breakReid Kleckner2018-11-011-0/+1
| | | | | | | | | | | | | | | | | | | 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
* [libc++abi] Provide __cxa_thread_atexit on FuchsiaPetr Hosek2018-10-292-3/+3
| | | | | | | | Fuchsia already supports this interface. Differential Revision: https://reviews.llvm.org/D53801 llvm-svn: 345534
* cxa_demangle: make demangler's parsing functions overridablePavel Labath2018-10-162-303/+363
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* NFC: Fix a -Wsign-conversion warningErik Pilkington2018-10-151-5/+11
| | | | llvm-svn: 344564
* Override libcxxabi's .clang-format in the demangle directoryErik Pilkington2018-10-111-0/+2
| | | | | | This directory uses LLVM style. llvm-svn: 344316
* Use C++03 friendly version of alignofEric Fiselier2018-10-111-1/+1
| | | | llvm-svn: 344215
* Update libc++abi's detection of aligned allocation after r344207.Eric Fiselier2018-10-112-4/+4
| | | | llvm-svn: 344208
* [libcxxabi] Allow building with sanitizers enabledLouis Dionne2018-10-102-0/+26
| | | | | | | | | | | | | | | 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
* Blind attempt to fix linker errors when building libc++abit w/o exceptions.Marshall Clow2018-10-101-0/+5
| | | | llvm-svn: 344156
* Make libc++abi work better with gcc's ARM unwind library. Reviewed as ↵Marshall Clow2018-10-105-34/+42
| | | | | | https://reviews.llvm.org/D42242 llvm-svn: 344152
* Port llvm r342166 to libcxxabi demanglerPavel Labath2018-10-101-19/+16
| | | | | | | | | | | | | | | | | | | | 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
* [NFC][unwind] Improve error message when a type has more than one RTTIsLouis Dionne2018-10-091-2/+3
| | | | | | | | | | 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
* Update docs to reference new libc++ mailing lists.Eric Fiselier2018-09-221-3/+3
| | | | llvm-svn: 342817
* Fix incorrectly aligned exceptions in 32 bit builds.Eric Fiselier2018-09-221-0/+3
| | | | | | | | | | | | | | | | | 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
* [libc++abi] is_strcmp parameter to is_equal is unused for WIN32Pirama Arumuga Nainar2018-09-211-0/+1
| | | | | | | | | | | | 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
* add a quick link to libc++Sylvestre Ledru2018-09-201-0/+1
| | | | llvm-svn: 342627
* Merge Demangle change in r342330 to libcxxabi.Nico Weber2018-09-152-31/+15
| | | | | | Differential Revision: https://reviews.llvm.org/D52104 llvm-svn: 342331
* Port my recent changes from LLVM copy of the demangler:Richard Smith2018-08-241-24/+74
| | | | | | | | | | | 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
* Port LLVM r340203 (and r340205) to libcxxabi.Richard Smith2018-08-202-4835/+5273
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Factor Node creation out of the demangler. No functionality change intended.Richard Smith2018-08-161-72/+94
| | | | | | (This is a port of llvm r339944 to libcxxabi.) llvm-svn: 339952
* [libcxxabi] Fix test_exception_address_alignment test for ARMYvan Roux2018-08-161-1/+2
| | | | | | | | | | Check _LIBCXXABI_ARM_EHABI macro instead of libunwind version. Fixes PR34182 Differential revision: https://reviews.llvm.org/D50170 llvm-svn: 339865
* [itanium demangler] Add llvm::itaniumFindTypesInMangledName()Erik Pilkington2018-08-131-0/+6
| | | | | | | | | | | | 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
* Add missing _LIBCXXABI_FUNC_VIS to __gxx_personality_seh0Martin Storsjo2018-08-111-1/+1
| | | | | | This was missed in SVN r337754. llvm-svn: 339503
* [itanium demangler] Support dot suffixes on block invocation functionsErik Pilkington2018-08-022-0/+4
| | | | | | rdar://32378759 llvm-svn: 338747
* Update version to 8.0.0svnHans Wennborg2018-08-011-1/+1
| | | | llvm-svn: 338564
* [libc++] Remove _LIBCPP_BUILDING_XXX macros, which are redundant since ↵Louis Dionne2018-08-012-2/+0
| | | | | | | | | | | | | | _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
* [demangler] Fix an oss-fuzz bug from r338138Erik Pilkington2018-07-281-0/+8
| | | | | | | | 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
* [demangler] Support for reference collapsingErik Pilkington2018-07-272-45/+60
| | | | | | llvm.org/PR38323 llvm-svn: 338138
* [CMake] Don't use LIBCXXABI_ENABLE_STATIC option before its declaredSam Clegg2018-07-251-7/+7
| | | | | | | | | | | | | | | | | 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
* [CMake] Use LIBCXXABI_LIBDIR_SUFFIX in libc++abi buildPetr Hosek2018-07-251-1/+1
| | | | | | | | This was changed unintentionally in r335809. Differential Revision: https://reviews.llvm.org/D49765 llvm-svn: 337937
* Fix dangling reference in testEric Fiselier2018-07-251-1/+1
| | | | llvm-svn: 337906
* [CMake] Option to control whether shared/static library is installedPetr Hosek2018-07-242-6/+17
| | | | | | | | | | | | | 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
* Reland "[CMake] Support statically linking dependencies only to shared or ↵Petr Hosek2018-07-242-8/+22
| | | | | | | | static library" This is a reland of commit r337668. llvm-svn: 337814
OpenPOWER on IntegriCloud