<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Support/StringSaver.cpp, branch users/nico/python-1</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>[llvm][Support] Avoid intermediate heap allocations in `StringSaver`</title>
<updated>2023-08-03T18:12:05+00:00</updated>
<author>
<name>Jan Svoboda</name>
<email>jan_svoboda@apple.com</email>
</author>
<published>2023-08-03T17:15:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=efcb07bf6e5fb0ff12e5855ab0ad86cd534d5578'/>
<id>efcb07bf6e5fb0ff12e5855ab0ad86cd534d5578</id>
<content type='text'>
The `Twine::str()` function currently always allocates heap memory via `std::string`. However, some instances of `Twine` don't need an intermediate buffer at all, and the rest can attempt to print into a stack buffer first.

This is intentionally not making use of `Twine::isSingleStringLiteral()` from D157010 to skip saving the string in the bump-pointer allocator, since the `StringSaver` documentation suggests that MUST happen for every given string.

Reviewed By: benlangmuir

Differential Revision: https://reviews.llvm.org/D157015
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The `Twine::str()` function currently always allocates heap memory via `std::string`. However, some instances of `Twine` don't need an intermediate buffer at all, and the rest can attempt to print into a stack buffer first.

This is intentionally not making use of `Twine::isSingleStringLiteral()` from D157010 to skip saving the string in the bump-pointer allocator, since the `StringSaver` documentation suggests that MUST happen for every given string.

Reviewed By: benlangmuir

Differential Revision: https://reviews.llvm.org/D157015
</pre>
</div>
</content>
</entry>
<entry>
<title>Temporarily Revert "[Support] Make UniqueStringSaver wrap a StringSet"</title>
<updated>2020-05-15T02:18:20+00:00</updated>
<author>
<name>Eric Christopher</name>
<email>echristo@gmail.com</email>
</author>
<published>2020-05-15T02:16:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=dad2e92eaf531500af5ab9ee3350e3e186944185'/>
<id>dad2e92eaf531500af5ab9ee3350e3e186944185</id>
<content type='text'>
as it's causing asan failures in clangd. Followed up offline
with repro instructions.

This reverts commit 29560a89ddcaf3af9b8a73d98d968a0911d21e27.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
as it's causing asan failures in clangd. Followed up offline
with repro instructions.

This reverts commit 29560a89ddcaf3af9b8a73d98d968a0911d21e27.
</pre>
</div>
</content>
</entry>
<entry>
<title>[Support] Make UniqueStringSaver wrap a StringSet</title>
<updated>2020-05-14T15:11:44+00:00</updated>
<author>
<name>Benjamin Kramer</name>
<email>benny.kra@googlemail.com</email>
</author>
<published>2020-05-14T15:11:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=29560a89ddcaf3af9b8a73d98d968a0911d21e27'/>
<id>29560a89ddcaf3af9b8a73d98d968a0911d21e27</id>
<content type='text'>
This is slightly more efficient while providing exactly the same
semantics.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is slightly more efficient while providing exactly the same
semantics.
</pre>
</div>
</content>
</entry>
<entry>
<title>Update the file headers across all of the LLVM projects in the monorepo</title>
<updated>2019-01-19T08:50:56+00:00</updated>
<author>
<name>Chandler Carruth</name>
<email>chandlerc@gmail.com</email>
</author>
<published>2019-01-19T08:50:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2946cd701067404b99c39fb29dc9c74bd7193eb3'/>
<id>2946cd701067404b99c39fb29dc9c74bd7193eb3</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix an undefined behavior when storing an empty StringRef.</title>
<updated>2018-08-20T13:12:54+00:00</updated>
<author>
<name>Haojian Wu</name>
<email>hokein@google.com</email>
</author>
<published>2018-08-20T13:12:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=54829bb3ff750cf8061fcd82db46f3596fa9cbac'/>
<id>54829bb3ff750cf8061fcd82db46f3596fa9cbac</id>
<content type='text'>
Summary: Passing a nullptr to memcpy is UB.

Reviewers: ioeric

Subscribers: llvm-commits, cfe-commits

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

llvm-svn: 340170
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary: Passing a nullptr to memcpy is UB.

Reviewers: ioeric

Subscribers: llvm-commits, cfe-commits

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

llvm-svn: 340170
</pre>
</div>
</content>
</entry>
<entry>
<title>[Support] Add a UniqueStringSaver: like StringSaver, but deduplicating.</title>
<updated>2018-07-23T10:44:40+00:00</updated>
<author>
<name>Sam McCall</name>
<email>sam.mccall@gmail.com</email>
</author>
<published>2018-07-23T10:44:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4bb7883d097f324d8c1d5f9f50e09c7471340abe'/>
<id>4bb7883d097f324d8c1d5f9f50e09c7471340abe</id>
<content type='text'>
Summary: Clarify contract of StringSaver (it null-terminates, callers rely on it).

Reviewers: hokein

Subscribers: llvm-commits

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

llvm-svn: 337677
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary: Clarify contract of StringSaver (it null-terminates, callers rely on it).

Reviewers: hokein

Subscribers: llvm-commits

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

llvm-svn: 337677
</pre>
</div>
</content>
</entry>
<entry>
<title>Use StringRef in StringSaver API (NFC)</title>
<updated>2016-10-05T01:32:41+00:00</updated>
<author>
<name>Mehdi Amini</name>
<email>mehdi.amini@apple.com</email>
</author>
<published>2016-10-05T01:32:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ec4fb5ba9736c1910b8a1631c46d653172e5a4df'/>
<id>ec4fb5ba9736c1910b8a1631c46d653172e5a4df</id>
<content type='text'>
llvm-svn: 283290
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
llvm-svn: 283290
</pre>
</div>
</content>
</entry>
<entry>
<title>There is only one saver of strings.</title>
<updated>2015-08-13T01:07:02+00:00</updated>
<author>
<name>Rafael Espindola</name>
<email>rafael.espindola@gmail.com</email>
</author>
<published>2015-08-13T01:07:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b82455d2625aef2c5925dda8586888c2c48a5013'/>
<id>b82455d2625aef2c5925dda8586888c2c48a5013</id>
<content type='text'>
llvm-svn: 244854
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
llvm-svn: 244854
</pre>
</div>
</content>
</entry>
<entry>
<title>Bring in a BumpPtrStringSaver from lld and simplify the interface.</title>
<updated>2015-06-13T12:49:52+00:00</updated>
<author>
<name>Rafael Espindola</name>
<email>rafael.espindola@gmail.com</email>
</author>
<published>2015-06-13T12:49:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=454adf645480245725c74fdbe8840ceff039ef64'/>
<id>454adf645480245725c74fdbe8840ceff039ef64</id>
<content type='text'>
StringSaver now always saves to a BumpPtrAllocator.

The only reason for having the virtual saveImpl is so lld can have a
thread safe version.

The reason for the distinct BumpPtrStringSaver class is to avoid the
virtual destructor.

llvm-svn: 239669
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
StringSaver now always saves to a BumpPtrAllocator.

The only reason for having the virtual saveImpl is so lld can have a
thread safe version.

The reason for the distinct BumpPtrStringSaver class is to avoid the
virtual destructor.

llvm-svn: 239669
</pre>
</div>
</content>
</entry>
</feed>
