Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3 |
|
#
9ae24fca |
| 05-Aug-2024 |
Nico Weber <thakis@chromium.org> |
Demangle: Fix comment typos to cycle bots
|
Revision tags: llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6 |
|
#
12d967c9 |
| 02-Jun-2023 |
Nick Desaulniers <ndesaulniers@google.com> |
[Damangle] convert rustDemangle to use std::string_view
I was doing this API conversion to use std::string_view top-down in D149104, but this exposed issues in individual demanglers that needed to g
[Damangle] convert rustDemangle to use std::string_view
I was doing this API conversion to use std::string_view top-down in D149104, but this exposed issues in individual demanglers that needed to get fixed first. There's no issue with the conversion for the Rust demangler, so convert it first.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D149784
show more ...
|
Revision tags: llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3 |
|
#
7c59e800 |
| 20-Apr-2023 |
Nick Desaulniers <ndesaulniers@google.com> |
Reland: [Demangle] replace use of llvm::StringView w/ std::string_view
This reverts commit d81cdb49d74064e88843733e7da92db865943509.
This refactoring was waiting on converting LLVM to C++17.
Leave
Reland: [Demangle] replace use of llvm::StringView w/ std::string_view
This reverts commit d81cdb49d74064e88843733e7da92db865943509.
This refactoring was waiting on converting LLVM to C++17.
Leave StringView.h and cleanup around for subsequent cleanup.
Additional fixes for missing std::string_view conversions for MSVC.
Reviewed By: MaskRay, DavidSpickett, ayzhao
Differential Revision: https://reviews.llvm.org/D148546
show more ...
|
Revision tags: llvmorg-16.0.2 |
|
#
d81cdb49 |
| 15-Apr-2023 |
Fangrui Song <i@maskray.me> |
Revert D148384 "[Demangle] replace use of llvm::StringView w/ std::string_view"
This reverts commit 3e559509b426b6aae735a7f57dbdaed1041d2622 and e0c4ffa796b553fa78c638a9584c05ac21fe07d5.
This still
Revert D148384 "[Demangle] replace use of llvm::StringView w/ std::string_view"
This reverts commit 3e559509b426b6aae735a7f57dbdaed1041d2622 and e0c4ffa796b553fa78c638a9584c05ac21fe07d5.
This still breaks Windows builds.
In addition, `#include <llvm/ADT/StringViewExtras.h>` in llvm/include/llvm/Demangle/ItaniumDemangle.h is a library layering violation (LLVMDemangle is the lowest LLVM library and cannot depend on LLVMSupport).
show more ...
|
#
3e559509 |
| 14-Apr-2023 |
Nick Desaulniers <ndesaulniers@google.com> |
[Demangle] replace use of llvm::StringView w/ std::string_view
This refactoring was waiting on converting LLVM to C++17.
Leave StringView.h and cleanup around for subsequent cleanup.
Reviewed By:
[Demangle] replace use of llvm::StringView w/ std::string_view
This refactoring was waiting on converting LLVM to C++17.
Leave StringView.h and cleanup around for subsequent cleanup.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D148384
show more ...
|
#
5e53e1bb |
| 14-Apr-2023 |
Nick Desaulniers <ndesaulniers@google.com> |
[StringView] remove consumeFront
Towards converting our use of llvm::StringView to std::string_view, remove a method that std::string_view doesn't have.
This could be moved to the nascent llvm/ADT/
[StringView] remove consumeFront
Towards converting our use of llvm::StringView to std::string_view, remove a method that std::string_view doesn't have.
This could be moved to the nascent llvm/ADT/StringViewExtras.h, but the use is highly localized to one TU. Move this to be a static function there.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D148375
show more ...
|
#
0f9f03af |
| 14-Apr-2023 |
Nick Desaulniers <ndesaulniers@google.com> |
[StringView] remove ctor incompatible with std::string_view
Towards replacing llvm::StringView with std::string_view, remove ctor that std::string_view doesn't have an analog for.
Reviewed By: eric
[StringView] remove ctor incompatible with std::string_view
Towards replacing llvm::StringView with std::string_view, remove ctor that std::string_view doesn't have an analog for.
Reviewed By: erichkeane, MaskRay
Differential Revision: https://reviews.llvm.org/D148353
show more ...
|
#
c8144eea |
| 14-Apr-2023 |
Nick Desaulniers <ndesaulniers@google.com> |
[RustDemangle] remove StringView::dropFront
Toward the goal of replacing llvm::StringView with std::string_view, first replacing users of llvm::StringView::dropFront, this case in the Rust demanglin
[RustDemangle] remove StringView::dropFront
Toward the goal of replacing llvm::StringView with std::string_view, first replacing users of llvm::StringView::dropFront, this case in the Rust demangling scheme seemed worth its own commit+review.
Reviewed By: erichkeane, MaskRay
Differential Revision: https://reviews.llvm.org/D148272
show more ...
|
Revision tags: llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2 |
|
#
d3b10150 |
| 28-Feb-2022 |
Nathan Sidwell <nathan@acm.org> |
[demangler] Simplify OutputBuffer initialization
Every non-testcase use of OutputBuffer contains code to allocate an initial buffer (using either 128 or 1024 as initial guesses). There's now no need
[demangler] Simplify OutputBuffer initialization
Every non-testcase use of OutputBuffer contains code to allocate an initial buffer (using either 128 or 1024 as initial guesses). There's now no need to do that, given recent changes to the buffer extension heuristics -- it allocates a 1k(ish) buffer on first need.
Just pass in a buffer (if any) to the constructor. Thus the OutputBuffer's ownership of the buffer starts at its own lifetime start. We can reduce the lifetime of this object in several cases.
That new constructor takes a 'size_t *' for the size argument, as all uses with a non-null buffer are passing through a malloc'd buffer from their own caller in this manner.
The buffer reset member function is never used, and is deleted.
Some adjustment to a couple of uses is needed, due to the lazy buffer creation of this patch.
a) the Microsoft demangler can demangle empty strings to nothing, which it then memoizes. We need to avoid the UB of passing nullptr to memcpy.
b) a unit test checks insertion of no characters into an empty buffer. We need to avoid UB when converting that to std::string.
The original buffer initialization code would return a failure code if that first malloc failed. Existing code either ignored that, called std::terminate with a FIXME, or returned an error code.
But that's not foolproof anyway, as a subsequent buffer extension failure ends up calling std::terminate. I am working on addressing that unfortunate failure mode in a manner more consistent with the C++ ABI design.
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D122604
show more ...
|
#
98277923 |
| 15-Aug-2022 |
Benjamin Kramer <benny.kra@googlemail.com> |
Make demangler independent of LLVM again
The demangler is not supposed to include bits of LLVM, so it can't use STLExtras.
This undoes part of 6d9cd9199a6fdeab0412117bcefc28f625510b61
|
#
6d9cd919 |
| 14-Aug-2022 |
Kazu Hirata <kazu@google.com> |
Use llvm::all_of (NFC)
|
#
aabeb5eb |
| 26-Apr-2022 |
Kirill Stoimenov <kstoimenov@google.com> |
Revert "[demangler] Simplify OutputBuffer initialization"
Reverting due to a bot failure: https://lab.llvm.org/buildbot/#/builders/5/builds/22738
This reverts commit 5b3ca24a35e91bf9c19af856e7f92c6
Revert "[demangler] Simplify OutputBuffer initialization"
Reverting due to a bot failure: https://lab.llvm.org/buildbot/#/builders/5/builds/22738
This reverts commit 5b3ca24a35e91bf9c19af856e7f92c69b17f989e.
show more ...
|
#
5b3ca24a |
| 28-Feb-2022 |
Nathan Sidwell <nathan@acm.org> |
[demangler] Simplify OutputBuffer initialization
Every non-testcase use of OutputBuffer contains code to allocate an initial buffer (using either 128 or 1024 as initial guesses). There's now no need
[demangler] Simplify OutputBuffer initialization
Every non-testcase use of OutputBuffer contains code to allocate an initial buffer (using either 128 or 1024 as initial guesses). There's now no need to do that, given recent changes to the buffer extension heuristics -- it allocates a 1k(ish) buffer on first need.
Just pass in a buffer (if any) to the constructor. Thus the OutputBuffer's ownership of the buffer starts at its own lifetime start. We can reduce the lifetime of this object in several cases.
That new constructor takes a 'size_t *' for the size argument, as all uses with a non-null buffer are passing through a malloc'd buffer from their own caller in this manner.
The buffer reset member function is never used, and is deleted.
The original buffer initialization code would return a failure code if that first malloc failed. Existing code either ignored that, called std::terminate with a FIXME, or returned an error code.
But that's not foolproof anyway, as a subsequent buffer extension failure ends up calling std::terminate. I am working on addressing that unfortunate failure mode in a manner more consistent with the C++ ABI design.
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D122604
show more ...
|
#
201c4b9c |
| 08-Apr-2022 |
Nathan Sidwell <nathan@acm.org> |
[demangler] Rust demangler buffer return
The rust demangler has some odd buffer handling code, which will copy the demangled string into the provided buffer, if it will fit. Otherwise it uses the al
[demangler] Rust demangler buffer return
The rust demangler has some odd buffer handling code, which will copy the demangled string into the provided buffer, if it will fit. Otherwise it uses the allocated buffer it made. But the length of the incoming buffer will have come from a previous call, which was the length of the demangled string -- not the buffer size. And of course, we're unconditionally allocating a temporary buffer in the first place. So we don't actually get buffer reuse, and we get a memcpy in somecases.
However, nothing in LLVM ever passes in a non-null pointer. Neither does anything pass in a status pointer that is then made use of. The only exercise these have is in the test suite.
So let's just make the rust demangler have the same API as the dlang demangler.
Reviewed By: tmiasko
Differential Revision: https://reviews.llvm.org/D123420
show more ...
|
#
51f6caf2 |
| 28-Feb-2022 |
Nathan Sidwell <nathan@acm.org> |
[demangler][NFC] Rename SwapAndRestore to ScopedOverride
The demangler has a utility class 'SwapAndRestore'. That name is confusing. It's not swapping anything, and the restore part happens at the o
[demangler][NFC] Rename SwapAndRestore to ScopedOverride
The demangler has a utility class 'SwapAndRestore'. That name is confusing. It's not swapping anything, and the restore part happens at the object's destruction. What it's actually doing is allowing a override of some value that is dynamically accessible within the lifetime of a lexical scope. Thus rename it to ScopedOverride, and tweak it's member variable names.
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D122606
show more ...
|
Revision tags: llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1 |
|
#
2e97236a |
| 22-Oct-2021 |
Luís Ferreira <contact@lsferreira.net> |
[Demangle] Rename OutputStream to OutputString
This patch is a refactor to implement prepend afterwards. Since this changes a lot of files and to conform with guidelines, I will separate this from t
[Demangle] Rename OutputStream to OutputString
This patch is a refactor to implement prepend afterwards. Since this changes a lot of files and to conform with guidelines, I will separate this from the implementation of prepend. Related to the discussion in https://reviews.llvm.org/D111414 , so please read it for more context.
Reviewed By: #libc_abi, dblaikie, ldionne
Differential Revision: https://reviews.llvm.org/D111947
show more ...
|
#
c8c2b462 |
| 01-Oct-2021 |
Tomasz Miąsko <tomasz.miasko@gmail.com> |
[Demangle][Rust] Parse non-ASCII identifiers
Rust allows use of non-ASCII identifiers, which in Rust mangling scheme are encoded using Punycode.
The encoding deviates from the standard by using an
[Demangle][Rust] Parse non-ASCII identifiers
Rust allows use of non-ASCII identifiers, which in Rust mangling scheme are encoded using Punycode.
The encoding deviates from the standard by using an underscore as the separator between ASCII part and a base-36 encoding of non-ASCII characters (avoiding hypen-minus in the symbol name). Other than that, the encoding follows the standard, and the decoder implemented here in turn follows the one given in RFC 3492.
To avoid an extra intermediate memory allocation while decoding Punycode, the interface of OutputStream is extended with an insert method.
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D104366
show more ...
|
Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3 |
|
#
6cc6ada1 |
| 23-Jun-2021 |
Tomasz Miąsko <tomasz.miasko@gmail.com> |
[Demangle][Rust] Hide implementation details NFC
Move content of the "public" header into the implementation file.
This also renames two enumerations that were previously used through `rust_demangl
[Demangle][Rust] Hide implementation details NFC
Move content of the "public" header into the implementation file.
This also renames two enumerations that were previously used through `rust_demangle::` scope, to avoid breaking a build bot with older version of GCC that rejects uses of enumerator through `E::A` if there is a variable with the same name as enumeration `E` in the scope.
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D104362
show more ...
|
#
2a5bb9c8 |
| 18-Jun-2021 |
Tomasz Miąsko <tomasz.miasko@gmail.com> |
[Demangle][Rust] Parse dot suffix
Allow mangled names to include an arbitrary dot suffix, akin to vendor specific suffix in Itanium mangling.
Primary motivation is a support for symbols renamed dur
[Demangle][Rust] Parse dot suffix
Allow mangled names to include an arbitrary dot suffix, akin to vendor specific suffix in Itanium mangling.
Primary motivation is a support for symbols renamed during ThinLTO import / promotion (ThinLTO is the default configuration for optimized builds in rustc).
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D104358
show more ...
|
Revision tags: llvmorg-12.0.1-rc2 |
|
#
f9a79356 |
| 07-Jun-2021 |
Tomasz Miąsko <tomasz.miasko@gmail.com> |
[Demangle][Rust] Parse const backreferences
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D103848
|
#
44d63c57 |
| 07-Jun-2021 |
Tomasz Miąsko <tomasz.miasko@gmail.com> |
[Demangle][Rust] Parse type backreferences
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D103847
|
#
82b7e822 |
| 07-Jun-2021 |
Tomasz Miąsko <tomasz.miasko@gmail.com> |
[Demangle][Rust] Parse path backreferences
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D103459
|
#
43929ccc |
| 07-Jun-2021 |
Tomasz Miąsko <tomasz.miasko@gmail.com> |
[Demangle][Rust] Parse instantiating crate
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D103460
|
#
619a65e5 |
| 07-Jun-2021 |
Tomasz Miąsko <tomasz.miasko@gmail.com> |
[Demangle][Rust] Parse dyn-trait-assoc-binding
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D103364
|
#
1499afa0 |
| 07-Jun-2021 |
Tomasz Miąsko <tomasz.miasko@gmail.com> |
[Demangle][Rust] Parse dyn-trait
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D103361
|