<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Support/Path.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] Use llvm::replace (NFC) (#137481)</title>
<updated>2025-04-27T01:18:09+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-04-27T01:18:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8210cdd764cb0b334f2bc205b316e94480c47c88'/>
<id>8210cdd764cb0b334f2bc205b316e94480c47c88</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[Support] Remove unused includes (NFC) (#116752)</title>
<updated>2024-11-20T14:51:43+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2024-11-20T14:51:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d44ea7186befe38eb2b3804b15cd1ee1777458ed'/>
<id>d44ea7186befe38eb2b3804b15cd1ee1777458ed</id>
<content type='text'>
Identified with misc-include-cleaner.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Identified with misc-include-cleaner.</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm][Support] Add and use errnoAsErrorCode (#84423)</title>
<updated>2024-03-09T07:30:33+00:00</updated>
<author>
<name>Michael Spencer</name>
<email>bigcheesegs@gmail.com</email>
</author>
<published>2024-03-09T07:30:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ba13fa2a5d57581bff1a7e9322234af30f4882f6'/>
<id>ba13fa2a5d57581bff1a7e9322234af30f4882f6</id>
<content type='text'>
LLVM is inconsistent about how it converts `errno` to `std::error_code`.
This can cause problems because values outside of `std::errc` compare
differently if one is system and one is generic on POSIX systems.

This is even more of a problem on Windows where use of the system
category is just wrong, as that is for Windows errors, which have a
completely different mapping than POSIX/generic errors. This patch fixes
one instance of this mistake in `JSONTransport.cpp`.

This patch adds `errnoAsErrorCode()` which makes it so people do not
need to think about this issue in the future. It also cleans up a lot of
usage of `errno` in LLVM and Clang.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
LLVM is inconsistent about how it converts `errno` to `std::error_code`.
This can cause problems because values outside of `std::errc` compare
differently if one is system and one is generic on POSIX systems.

This is even more of a problem on Windows where use of the system
category is just wrong, as that is for Windows errors, which have a
completely different mapping than POSIX/generic errors. This patch fixes
one instance of this mistake in `JSONTransport.cpp`.

This patch adds `errnoAsErrorCode()` which makes it so people do not
need to think about this issue in the future. It also cleans up a lot of
usage of `errno` in LLVM and Clang.</pre>
</div>
</content>
</entry>
<entry>
<title>[Support] Use all_read | all_write for createTemporaryFile (#83360)</title>
<updated>2024-02-29T16:05:38+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2024-02-29T16:05:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=310ed337092d6afc78594e1d8e32e6f44fff5568'/>
<id>310ed337092d6afc78594e1d8e32e6f44fff5568</id>
<content type='text'>
In a04879ce7dd6, dsymutil switched from using TempFile to
createTemporaryFile. This caused a regression because the two use
different permissions:

 - TempFile opens the file as all_read | all_write
 - createTemporaryFile opens the file as owner_read | owner_write

The latter turns out to be problematic for dsymutil because it either
promotes the temporary to a proper output file, or it would pass it to
`lipo` to create a universal binary and `lipo` preserves the permissions
of the input files. Either way, this caused issues when the build system
was run as a different user than the one ingesting the resulting
binaries.

I did some version control archeology and I couldn't find evidence that
these permissions were chosen purposely. Both could be considered
reasonable default.

This patch changes the permissions to `all read | all write` to make the
two consistent and match the one currently used by the higher level
abstraction (TempFile).

rdar://123722848</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In a04879ce7dd6, dsymutil switched from using TempFile to
createTemporaryFile. This caused a regression because the two use
different permissions:

 - TempFile opens the file as all_read | all_write
 - createTemporaryFile opens the file as owner_read | owner_write

The latter turns out to be problematic for dsymutil because it either
promotes the temporary to a proper output file, or it would pass it to
`lipo` to create a universal binary and `lipo` preserves the permissions
of the input files. Either way, this caused issues when the build system
was run as a different user than the one ingesting the resulting
binaries.

I did some version control archeology and I couldn't find evidence that
these permissions were chosen purposely. Both could be considered
reasonable default.

This patch changes the permissions to `all read | all write` to make the
two consistent and match the one currently used by the higher level
abstraction (TempFile).

rdar://123722848</pre>
</div>
</content>
</entry>
<entry>
<title>[Path] Fix off-by-one in finding filename for win style paths (#78055)</title>
<updated>2024-01-18T07:03:03+00:00</updated>
<author>
<name>Matheus Izvekov</name>
<email>mizvekov@gmail.com</email>
</author>
<published>2024-01-18T07:03:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=361016f680abf830004ef726f816820a0c8c1950'/>
<id>361016f680abf830004ef726f816820a0c8c1950</id>
<content type='text'>
This fixes a crash where `path::parent_path` causes an invalid access on
a string upon receiving a path that consists of a single colon.

On Windows machine, with runtime checks enabled build, upon `clang -I:
test.cc` produces:
```
Assertion failed: Index &lt; Length &amp;&amp; "Invalid index!", file llvm\include\llvm/ADT/StringRef.h, line 232
...
 #6 0x00007ff7816201eb `anonymous namespace'::parent_path_end llvm\lib\Support\Path.cpp:144:0
 #7 0x00007ff781620135 llvm::sys::path::parent_path(class llvm::StringRef, enum llvm::sys::path::Style) llvm\lib\Support\Path.cpp:470:0
```

Ideally, we can look for the last colon starting from the last
character, but we can instead start from second to last, and handle
empty paths by abusing `0 - 1 == npos`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes a crash where `path::parent_path` causes an invalid access on
a string upon receiving a path that consists of a single colon.

On Windows machine, with runtime checks enabled build, upon `clang -I:
test.cc` produces:
```
Assertion failed: Index &lt; Length &amp;&amp; "Invalid index!", file llvm\include\llvm/ADT/StringRef.h, line 232
...
 #6 0x00007ff7816201eb `anonymous namespace'::parent_path_end llvm\lib\Support\Path.cpp:144:0
 #7 0x00007ff781620135 llvm::sys::path::parent_path(class llvm::StringRef, enum llvm::sys::path::Style) llvm\lib\Support\Path.cpp:470:0
```

Ideally, we can look for the last colon starting from the last
character, but we can instead start from second to last, and handle
empty paths by abusing `0 - 1 == npos`.</pre>
</div>
</content>
</entry>
<entry>
<title>[Support] Use SmallString::operator std::string (NFC)</title>
<updated>2024-01-18T04:22:58+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2024-01-18T04:22:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7e6482b3d8bbc31ddb005dd30cd50ded780a360a'/>
<id>7e6482b3d8bbc31ddb005dd30cd50ded780a360a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[Support] Use StringRef::starts_with/ends_with instead of startswith/endswith. NFC.</title>
<updated>2023-11-03T18:19:33+00:00</updated>
<author>
<name>Simon Pilgrim</name>
<email>llvm-dev@redking.me.uk</email>
</author>
<published>2023-11-03T18:14:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=bcb685e11945946335c2dc6265779f0226491b49'/>
<id>bcb685e11945946335c2dc6265779f0226491b49</id>
<content type='text'>
startswith/endswith wrap starts_with/ends_with and will eventually go away (to more closely match string_view)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
startswith/endswith wrap starts_with/ends_with and will eventually go away (to more closely match string_view)
</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm] Add missing StringExtras.h includes</title>
<updated>2023-06-25T14:42:22+00:00</updated>
<author>
<name>Elliot Goodrich</name>
<email>elliotgoodrich@gmail.com</email>
</author>
<published>2023-06-17T12:18:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b0abd4893fa1bfae7f71b6b6e98770c9b1c07620'/>
<id>b0abd4893fa1bfae7f71b6b6e98770c9b1c07620</id>
<content type='text'>
In preparation for removing the `#include "llvm/ADT/StringExtras.h"`
from the header to source file of `llvm/Support/Error.h`, first add in
all the missing includes that were previously included transitively
through this header.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In preparation for removing the `#include "llvm/ADT/StringExtras.h"`
from the header to source file of `llvm/Support/Error.h`, first add in
all the missing includes that were previously included transitively
through this header.
</pre>
</div>
</content>
</entry>
<entry>
<title>llvm/lib: Use &lt;cerrno&gt; explicitly since D146395 has hidden `errno`</title>
<updated>2023-05-11T14:31:56+00:00</updated>
<author>
<name>NAKAMURA Takumi</name>
<email>geek4civic@gmail.com</email>
</author>
<published>2023-04-29T07:25:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e13d1b5227a77bb7becfd4c49a60720ecc33f870'/>
<id>e13d1b5227a77bb7becfd4c49a60720ecc33f870</id>
<content type='text'>
Differential Revision: https://reviews.llvm.org/D149513
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Differential Revision: https://reviews.llvm.org/D149513
</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm-driver] Reinvoke clang as described by llvm driver extra args</title>
<updated>2023-02-10T19:42:32+00:00</updated>
<author>
<name>Alex Brachet</name>
<email>abrachet@google.com</email>
</author>
<published>2023-02-10T19:41:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3e57aa304f15a0821e5bcc90bd346529fed6658d'/>
<id>3e57aa304f15a0821e5bcc90bd346529fed6658d</id>
<content type='text'>
Differential Revision: https://reviews.llvm.org/D137800
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Differential Revision: https://reviews.llvm.org/D137800
</pre>
</div>
</content>
</entry>
</feed>
