14 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
Chandler Carruth
6b547686c5 Update the file headers across all of the LLVM projects in the monorepo
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351636 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-19 08:50:56 +00:00
James Henderson
c020a4b755 Add __[_[_]]Z demangling to new common demangle function
This is a follow-up to r351448. It adds support for other _*Z extensions
of the Itanium demanling, to the newly available demangle function
heuristic.

Reviewed by: erik.pilkington, rupprecht, grimar

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351551 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-18 13:58:41 +00:00
James Henderson
bc34da10fa Move demangling function from llvm-objdump to Demangle library
This allows it to be used in an upcoming llvm-readobj change.

A small change in internal behaviour of the function is to always call
the microsoftDemangle function if the string does not have an itanium
encoding prefix, rather than only if it starts with '?'. This is
harmless because the microsoftDemangle function does the same check
already.

Reviewed by: grimar, erik.pilkington

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351448 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-17 15:18:44 +00:00
Pavel Labath
07b822e4d4 [Demangle] remove itaniumFindTypesInMangledName
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347670 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-27 16:11:24 +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
Erik Pilkington
31ff4125c7 Attempt to fix some MSVC build errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339587 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-13 17:39:19 +00:00
Erik Pilkington
77d3f0227a [itanium demangler] Add llvm::itaniumFindTypesInMangledName()
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339580 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-13 16:37:47 +00:00
Stefan Granitz
e52df1611a [Demangle] Add another test for ItaniumPartialDemangler
Summary: Show the behavior of print operations in the ItaniumPartialDemangler. It's a summary of what the current integration in LLDB assumes. For new users this may be a useful example.

Reviewers: erik.pilkington

Subscribers: llvm-commits, lldb-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339297 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-08 22:38:23 +00:00
Fangrui Song
109abe0d9a [demangler] Add ItaniumPartialDemangler::isCtorOrDtor
Reviewers: erik.pilkington, ruiu, echristo, pcc

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333159 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-24 06:57:57 +00:00
Nico Weber
3220080533 Inline a few CMake variables into their only uses.
No behavior change. Makes unittests CMakeLists.txt files more self-consistent.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@332280 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-14 19:23:31 +00:00
Erik Pilkington
ed0af08f68 Fix another bot failure from r329951.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329986 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-13 02:53:26 +00:00
Erik Pilkington
a51cdcd3c8 Free a pointer, fix a bot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329969 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-12 22:54:47 +00:00
Erik Pilkington
d0381b68b8 [demangler] Add a partial demangling API for LLDB.
This parses a mangled name into an AST (typically an intermediate stage in
itaniumDemangle) and provides some functions to query certain properties or
print certain parts of the demangled name.

Differential revision: https://reviews.llvm.org/D44668

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329951 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-12 20:41:38 +00:00