7 Commits

Author SHA1 Message Date
Chandler Carruth
438784aaf3 Update more file headers across all of the LLVM projects in the monorepo
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351648 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-19 10:56:40 +00:00
Erik Pilkington
cc6eedfcf3 NFC: Make the copies of the demangler byte-for-byte identical
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351474 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-17 20:37:51 +00:00
Pavel Labath
97b215a773 Port libcxxabi r344607 into llvm
Summary:
The original commit message was:
    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.

The only difference here is the addition of a unit test which exercises
the CRTP mechanism to override a function in the parser.

Reviewers: erik.pilkington, rsmith, EricWF

Subscribers: mgorny, kristina, llvm-commits

Differential Revision: https://reviews.llvm.org/D53300

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344703 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-17 18:50:25 +00:00
Chandler Carruth
8c9f47fdf1 Avoid specializing a variadic member template in a way that seems to not
agree with MSVC.

There isn't actually a need for specialization here as we can write the
code generically and just have a test that will fold away as a constant.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340700 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-26 09:17:49 +00:00
Simon Pilgrim
ad6c4284cd Remove superfluous semicolon. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340686 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-25 16:49:35 +00:00
Richard Smith
fc721a89bb Allow demangler's node allocator to fail, and bail out of the entire
demangling process when it does.

Use this to support a "lookup" query for the mangling canonicalizer that
does not create new nodes. This could also be used to implement
demangling with a fixed-size temporary storage buffer.

Reviewers: erik.pilkington

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D51003

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340670 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-24 23:26:05 +00:00
Richard Smith
a5beadf824 Add data structure to form equivalence classes of mangled names.
Summary:
Given a set of equivalent name fragments, this mechanism determines whether two
mangled names are equivalent. The intent is to use this for fuzzy matching of
profile data against the program after certain refactorings are performed.

Reviewers: erik.pilkington, dlj

Subscribers: mgorny, llvm-commits

Differential Revision: https://reviews.llvm.org/D50935

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340663 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-24 22:31:51 +00:00