<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Support/StringExtras.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>[Support] Use list-initialization for returning pairs (#160447)</title>
<updated>2025-09-24T15:44:56+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-09-24T15:44:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7196554c2a16b5323923ae90008ccc48e33c020d'/>
<id>7196554c2a16b5323923ae90008ccc48e33c020d</id>
<content type='text'>
In C++17 and later, "return {A, B};" guarantees copy elision for a
std::pair return type, ensuring the object is constructed directly in
the return slot.  This patch updates those instances under Support/.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In C++17 and later, "return {A, B};" guarantees copy elision for a
std::pair return type, ensuring the object is constructed directly in
the return slot.  This patch updates those instances under Support/.</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm][Support] fix convertToSnakeFromCamelCase (#68375)</title>
<updated>2023-10-06T21:33:13+00:00</updated>
<author>
<name>Maksim Levental</name>
<email>maksim.levental@gmail.com</email>
</author>
<published>2023-10-06T21:33:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=767dcc5f77b61a3363f7836661cc208a5bfd1c9c'/>
<id>767dcc5f77b61a3363f7836661cc208a5bfd1c9c</id>
<content type='text'>
Currently runs of caps aren't handled correctly so e.g. something like
`Intel_OCL_BI` is snake cased to `intel_o_c_l_b_i` (previously discussed
on this [phabricator
patch](https://reviews.llvm.org/rG92233062c17590d3157bdc6db430fcdfc54312fe)).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently runs of caps aren't handled correctly so e.g. something like
`Intel_OCL_BI` is snake cased to `intel_o_c_l_b_i` (previously discussed
on this [phabricator
patch](https://reviews.llvm.org/rG92233062c17590d3157bdc6db430fcdfc54312fe)).</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm] Use range-based for loops (NFC)</title>
<updated>2021-12-02T17:27:47+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2021-12-02T17:27:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=262dd1e42d719d2bd3fa18233500204c6950cede'/>
<id>262dd1e42d719d2bd3fa18233500204c6950cede</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm] Rename StringRef _lower() method calls to _insensitive()</title>
<updated>2021-06-24T21:22:01+00:00</updated>
<author>
<name>Martin Storsjö</name>
<email>martin@martin.st</email>
</author>
<published>2021-06-23T11:52:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=42f74e824908f164f31e1d9e913dbd975d03fe4a'/>
<id>42f74e824908f164f31e1d9e913dbd975d03fe4a</id>
<content type='text'>
This is a mechanical change. This actually also renames the
similarly named methods in the SmallString class, however these
methods don't seem to be used outside of the llvm subproject, so
this doesn't break building of the rest of the monorepo.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a mechanical change. This actually also renames the
similarly named methods in the SmallString class, however these
methods don't seem to be used outside of the llvm subproject, so
this doesn't break building of the rest of the monorepo.
</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm][StringExtras] Add missing include of cctype</title>
<updated>2020-04-15T02:29:54+00:00</updated>
<author>
<name>River Riddle</name>
<email>riddleriver@gmail.com</email>
</author>
<published>2020-04-15T02:29:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b30246087a3c56c3dad60cadc7fb2692ed758566'/>
<id>b30246087a3c56c3dad60cadc7fb2692ed758566</id>
<content type='text'>
This fixes build breakages on windows.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes build breakages on windows.
</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm][StringExtras] Merge StringExtras from MLIR into LLVM</title>
<updated>2020-04-15T01:57:22+00:00</updated>
<author>
<name>River Riddle</name>
<email>riddleriver@gmail.com</email>
</author>
<published>2020-04-15T01:54:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=229e392b4edb65b69caa49644cdeaa358095146d'/>
<id>229e392b4edb65b69caa49644cdeaa358095146d</id>
<content type='text'>
Summary:
This revision adds two utilities currently present in MLIR to LLVM StringExtras:

* convertToSnakeFromCamelCase
Convert a string from a camel case naming scheme, to a snake case scheme

* convertToCamelFromSnakeCase
Convert a string from a snake case naming scheme, to a camel case scheme

Differential Revision: https://reviews.llvm.org/D78167
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
This revision adds two utilities currently present in MLIR to LLVM StringExtras:

* convertToSnakeFromCamelCase
Convert a string from a camel case naming scheme, to a snake case scheme

* convertToCamelFromSnakeCase
Convert a string from a snake case naming scheme, to a camel case scheme

Differential Revision: https://reviews.llvm.org/D78167
</pre>
</div>
</content>
</entry>
<entry>
<title>Print quoted backslashes in LLVM IR as \\ instead of \5C</title>
<updated>2019-10-10T18:31:57+00:00</updated>
<author>
<name>Reid Kleckner</name>
<email>rnk@google.com</email>
</author>
<published>2019-10-10T18:31:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=67d440b949d6fefef53deec1e585435ffb33f4f8'/>
<id>67d440b949d6fefef53deec1e585435ffb33f4f8</id>
<content type='text'>
This improves readability of Windows path string literals in LLVM IR.
The LLVM assembler has supported \\ in IR strings for a long time, but
the lexer doesn't tolerate escaped quotes, so they have to be printed as
\22 for now.

llvm-svn: 374415
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This improves readability of Windows path string literals in LLVM IR.
The LLVM assembler has supported \\ in IR strings for a long time, but
the lexer doesn't tolerate escaped quotes, so they have to be printed as
\22 for now.

llvm-svn: 374415
</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>[ADT] Replace std::isprint by llvm::isPrint.</title>
<updated>2018-07-26T15:31:41+00:00</updated>
<author>
<name>Michael Kruse</name>
<email>llvm@meinersbur.de</email>
</author>
<published>2018-07-26T15:31:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6f1da6e345ccf89a7a0d0bc964bee7f1eb7ed9f6'/>
<id>6f1da6e345ccf89a7a0d0bc964bee7f1eb7ed9f6</id>
<content type='text'>
The standard library functions ::isprint/std::isprint have platform-
and locale-dependent behavior which makes LLVM's output less
predictable. In particular, regression tests my fail depending on the
implementation of these functions.

Implement llvm::isPrint in StringExtras.h with a standard behavior and
replace all uses of ::isprint/std::isprint by a call it llvm::isPrint.
The function is inlined and does not look up language settings so it
should perform better than the standard library's version.

Such a replacement has already been done for isdigit, isalpha, isxdigit
in r314883. gtest does the same in gtest-printers.cc using the following
justification:

    // Returns true if c is a printable ASCII character.  We test the
    // value of c directly instead of calling isprint(), which is buggy on
    // Windows Mobile.
    inline bool IsPrintableAscii(wchar_t c) {
      return 0x20 &lt;= c &amp;&amp; c &lt;= 0x7E;
    }

Similar issues have also been encountered by Julia:
https://github.com/JuliaLang/julia/issues/7416

I noticed the problem myself when on Windows isprint('\t') started to
evaluate to true (see https://stackoverflow.com/questions/51435249) and
thus caused several unit tests to fail. The result of isprint doesn't
seem to be well-defined even for ASCII characters. Therefore I suggest
to replace isprint by a platform-independent version.

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

llvm-svn: 338034
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The standard library functions ::isprint/std::isprint have platform-
and locale-dependent behavior which makes LLVM's output less
predictable. In particular, regression tests my fail depending on the
implementation of these functions.

Implement llvm::isPrint in StringExtras.h with a standard behavior and
replace all uses of ::isprint/std::isprint by a call it llvm::isPrint.
The function is inlined and does not look up language settings so it
should perform better than the standard library's version.

Such a replacement has already been done for isdigit, isalpha, isxdigit
in r314883. gtest does the same in gtest-printers.cc using the following
justification:

    // Returns true if c is a printable ASCII character.  We test the
    // value of c directly instead of calling isprint(), which is buggy on
    // Windows Mobile.
    inline bool IsPrintableAscii(wchar_t c) {
      return 0x20 &lt;= c &amp;&amp; c &lt;= 0x7E;
    }

Similar issues have also been encountered by Julia:
https://github.com/JuliaLang/julia/issues/7416

I noticed the problem myself when on Windows isprint('\t') started to
evaluate to true (see https://stackoverflow.com/questions/51435249) and
thus caused several unit tests to fail. The result of isprint doesn't
seem to be well-defined even for ASCII characters. Therefore I suggest
to replace isprint by a platform-independent version.

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

llvm-svn: 338034
</pre>
</div>
</content>
</entry>
<entry>
<title>[ADT] Make escaping fn conform to coding guidelines</title>
<updated>2018-05-31T17:01:42+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2018-05-31T17:01:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=745918ff87f17fae86edcdfac8daa16f44c8b1e0'/>
<id>745918ff87f17fae86edcdfac8daa16f44c8b1e0</id>
<content type='text'>
As noted by Adrian on llvm-commits, PrintHTMLEscaped and PrintEscaped in
StringExtras did not conform to the LLVM coding guidelines. This commit
rectifies that.

llvm-svn: 333669
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As noted by Adrian on llvm-commits, PrintHTMLEscaped and PrintEscaped in
StringExtras did not conform to the LLVM coding guidelines. This commit
rectifies that.

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