<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Demangle/RustDemangle.cpp, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>Demangle: Fix comment typos to cycle bots</title>
<updated>2024-08-05T12:04:30+00:00</updated>
<author>
<name>Nico Weber</name>
<email>thakis@chromium.org</email>
</author>
<published>2024-08-05T12:04:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9ae24fca2522c70eaff6c3e9c5ea89675db7c213'/>
<id>9ae24fca2522c70eaff6c3e9c5ea89675db7c213</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[Damangle] convert rustDemangle to use std::string_view</title>
<updated>2023-06-02T22:08:14+00:00</updated>
<author>
<name>Nick Desaulniers</name>
<email>ndesaulniers@google.com</email>
</author>
<published>2023-06-02T22:08:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=12d967c95f1633bebd1b225ddd53573951a7ca43'/>
<id>12d967c95f1633bebd1b225ddd53573951a7ca43</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Reland: [Demangle] replace use of llvm::StringView w/ std::string_view</title>
<updated>2023-04-20T18:22:20+00:00</updated>
<author>
<name>Nick Desaulniers</name>
<email>ndesaulniers@google.com</email>
</author>
<published>2023-04-20T18:08:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7c59e8001a3b66be545a890a26ad8a24a6c9fe4b'/>
<id>7c59e8001a3b66be545a890a26ad8a24a6c9fe4b</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert D148384 "[Demangle] replace use of llvm::StringView w/ std::string_view"</title>
<updated>2023-04-15T01:42:11+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2023-04-15T01:42:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d81cdb49d74064e88843733e7da92db865943509'/>
<id>d81cdb49d74064e88843733e7da92db865943509</id>
<content type='text'>
This reverts commit 3e559509b426b6aae735a7f57dbdaed1041d2622 and e0c4ffa796b553fa78c638a9584c05ac21fe07d5.

This still breaks Windows builds.

In addition, `#include &lt;llvm/ADT/StringViewExtras.h&gt;` in
llvm/include/llvm/Demangle/ItaniumDemangle.h is a library layering violation
(LLVMDemangle is the lowest LLVM library and cannot depend on LLVMSupport).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 3e559509b426b6aae735a7f57dbdaed1041d2622 and e0c4ffa796b553fa78c638a9584c05ac21fe07d5.

This still breaks Windows builds.

In addition, `#include &lt;llvm/ADT/StringViewExtras.h&gt;` in
llvm/include/llvm/Demangle/ItaniumDemangle.h is a library layering violation
(LLVMDemangle is the lowest LLVM library and cannot depend on LLVMSupport).
</pre>
</div>
</content>
</entry>
<entry>
<title>[Demangle] replace use of llvm::StringView w/ std::string_view</title>
<updated>2023-04-14T22:48:38+00:00</updated>
<author>
<name>Nick Desaulniers</name>
<email>ndesaulniers@google.com</email>
</author>
<published>2023-04-14T22:43:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3e559509b426b6aae735a7f57dbdaed1041d2622'/>
<id>3e559509b426b6aae735a7f57dbdaed1041d2622</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>[StringView] remove consumeFront</title>
<updated>2023-04-14T22:34:24+00:00</updated>
<author>
<name>Nick Desaulniers</name>
<email>ndesaulniers@google.com</email>
</author>
<published>2023-04-14T22:27:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5e53e1bbc34fe563b740364d7329ca0bd123f9ff'/>
<id>5e53e1bbc34fe563b740364d7329ca0bd123f9ff</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>[StringView] remove ctor incompatible with std::string_view</title>
<updated>2023-04-14T18:16:11+00:00</updated>
<author>
<name>Nick Desaulniers</name>
<email>ndesaulniers@google.com</email>
</author>
<published>2023-04-14T18:11:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0f9f03afca76240cc419d86e6651534e9aa502e0'/>
<id>0f9f03afca76240cc419d86e6651534e9aa502e0</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>[RustDemangle] remove StringView::dropFront</title>
<updated>2023-04-14T16:18:07+00:00</updated>
<author>
<name>Nick Desaulniers</name>
<email>ndesaulniers@google.com</email>
</author>
<published>2023-04-14T16:18:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c8144eea9eff03a6a803d8e5dc45776f035486af'/>
<id>c8144eea9eff03a6a803d8e5dc45776f035486af</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>[demangler] Simplify OutputBuffer initialization</title>
<updated>2022-10-17T11:23:16+00:00</updated>
<author>
<name>Nathan Sidwell</name>
<email>nathan@acm.org</email>
</author>
<published>2022-02-28T18:13:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d3b10150b683142a7481893ddffe9206e1d29f95'/>
<id>d3b10150b683142a7481893ddffe9206e1d29f95</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Make demangler independent of LLVM again</title>
<updated>2022-08-15T09:44:28+00:00</updated>
<author>
<name>Benjamin Kramer</name>
<email>benny.kra@googlemail.com</email>
</author>
<published>2022-08-15T09:44:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=982779230fe0950e5ee0192fdad070d796094d30'/>
<id>982779230fe0950e5ee0192fdad070d796094d30</id>
<content type='text'>
The demangler is not supposed to include bits of LLVM, so it can't use STLExtras.

This undoes part of 6d9cd9199a6fdeab0412117bcefc28f625510b61</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The demangler is not supposed to include bits of LLVM, so it can't use STLExtras.

This undoes part of 6d9cd9199a6fdeab0412117bcefc28f625510b61</pre>
</div>
</content>
</entry>
</feed>
