<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Support/VirtualFileSystem.cpp, branch users/koachan/spr/main.sparcias-enable-parseforallfeatures-in-matchoperandparserimpl</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>[VFS] Avoid &lt;stack&gt; include (NFC)</title>
<updated>2024-06-21T13:17:41+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2024-06-21T12:59:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=48ef912e2b32798b704af242e551a7090102c750'/>
<id>48ef912e2b32798b704af242e551a7090102c750</id>
<content type='text'>
Directly use a vector instead of wrapping it in a stack, like we
do in most places.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Directly use a vector instead of wrapping it in a stack, like we
do in most places.
</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm-project] Fix typo "seperate" (#95373)</title>
<updated>2024-06-13T19:20:27+00:00</updated>
<author>
<name>Jay Foad</name>
<email>jay.foad@amd.com</email>
</author>
<published>2024-06-13T19:20:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d4a0154902fb9b0611ed857134b26a64a1d5ad1e'/>
<id>d4a0154902fb9b0611ed857134b26a64a1d5ad1e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[clang] Fix handling of adding a file with the same name as an existing dir to VFS (#94461)</title>
<updated>2024-06-06T15:32:50+00:00</updated>
<author>
<name>jensmassberg</name>
<email>87519353+jensmassberg@users.noreply.github.com</email>
</author>
<published>2024-06-06T15:32:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=09f19c7396ecf26623d08c4288b35a60e950fcd8'/>
<id>09f19c7396ecf26623d08c4288b35a60e950fcd8</id>
<content type='text'>
When trying to add a file to clang's VFS via `addFile` and a directory
of the same name already exists, we run into a [out-of-bound
access](https://github.com/llvm/llvm-project/blob/145815c180fc82c5a55bf568d01d98d250490a55/llvm/lib/Support/Path.cpp#L244).

The problem is that the file name is [recognised as existing path](
https://github.com/llvm/llvm-project/blob/145815c180fc82c5a55bf568d01d98d250490a55/llvm/lib/Support/VirtualFileSystem.cpp#L896)
and thus continues to process the next part of the path which doesn't
exist.

This patch adds a check if we have reached the last part of the filename
and return false in that case.
This we reject to add a file if a directory of the same name already
exists.

This is in sync with [this
check](https://github.com/llvm/llvm-project/blob/145815c180fc82c5a55bf568d01d98d250490a55/llvm/lib/Support/VirtualFileSystem.cpp#L903)
that rejects adding a path if a file of the same name already exists.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When trying to add a file to clang's VFS via `addFile` and a directory
of the same name already exists, we run into a [out-of-bound
access](https://github.com/llvm/llvm-project/blob/145815c180fc82c5a55bf568d01d98d250490a55/llvm/lib/Support/Path.cpp#L244).

The problem is that the file name is [recognised as existing path](
https://github.com/llvm/llvm-project/blob/145815c180fc82c5a55bf568d01d98d250490a55/llvm/lib/Support/VirtualFileSystem.cpp#L896)
and thus continues to process the next part of the path which doesn't
exist.

This patch adds a check if we have reached the last part of the filename
and return false in that case.
This we reject to add a file if a directory of the same name already
exists.

This is in sync with [this
check](https://github.com/llvm/llvm-project/blob/145815c180fc82c5a55bf568d01d98d250490a55/llvm/lib/Support/VirtualFileSystem.cpp#L903)
that rejects adding a path if a file of the same name already exists.</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm] Use StringRef::operator== instead of StringRef::equals (NFC) (#91441)</title>
<updated>2024-05-08T17:33:53+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2024-05-08T17:33:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=bb6df0804ba0a0b0581aec4156138f5144dbcee2'/>
<id>bb6df0804ba0a0b0581aec4156138f5144dbcee2</id>
<content type='text'>
I'm planning to remove StringRef::equals in favor of
StringRef::operator==.

- StringRef::operator==/!= outnumber StringRef::equals by a factor of
  70 under llvm/ in terms of their usage.

- The elimination of StringRef::equals brings StringRef closer to
  std::string_view, which has operator== but not equals.

- S == "foo" is more readable than S.equals("foo"), especially for
  !Long.Expression.equals("str") vs Long.Expression != "str".</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I'm planning to remove StringRef::equals in favor of
StringRef::operator==.

- StringRef::operator==/!= outnumber StringRef::equals by a factor of
  70 under llvm/ in terms of their usage.

- The elimination of StringRef::equals brings StringRef closer to
  std::string_view, which has operator== but not equals.

- S == "foo" is more readable than S.equals("foo"), especially for
  !Long.Expression.equals("str") vs Long.Expression != "str".</pre>
</div>
</content>
</entry>
<entry>
<title>[modules] Accept equivalent module caches from different symlink (#90925)</title>
<updated>2024-05-07T20:55:44+00:00</updated>
<author>
<name>Ellis Hoag</name>
<email>ellis.sparky.hoag@gmail.com</email>
</author>
<published>2024-05-07T20:55:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2ad6917c4c524576405f2146424911fd9adb3528'/>
<id>2ad6917c4c524576405f2146424911fd9adb3528</id>
<content type='text'>
Use `VFS.equivalent()`, which follows symlinks, to check if two module
cache paths are equivalent. This prevents a PCH error when building from
a different path that is a symlink of the original.

```
error: PCH was compiled with module cache path '/home/foo/blah/ModuleCache/2IBP1TNT8OR8D', but the path is currently '/data/users/foo/blah/ModuleCache/2IBP1TNT8OR8D'
1 error generated.
```</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use `VFS.equivalent()`, which follows symlinks, to check if two module
cache paths are equivalent. This prevents a PCH error when building from
a different path that is a symlink of the original.

```
error: PCH was compiled with module cache path '/home/foo/blah/ModuleCache/2IBP1TNT8OR8D', but the path is currently '/data/users/foo/blah/ModuleCache/2IBP1TNT8OR8D'
1 error generated.
```</pre>
</div>
</content>
</entry>
<entry>
<title>[Support] Use StringRef::operator== instead of StringRef::equals (NFC) (#91042)</title>
<updated>2024-05-04T15:46:48+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2024-05-04T15:46:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7ee6288312e8cde8d2e8ee48f87bbab966a89247'/>
<id>7ee6288312e8cde8d2e8ee48f87bbab966a89247</id>
<content type='text'>
I'm planning to remove StringRef::equals in favor of
StringRef::operator==.

- StringRef::operator== outnumbers StringRef::equals by a factor of 25
  under llvm/ in terms of their usage.

- The elimination of StringRef::equals brings StringRef closer to
  std::string_view, which has operator== but not equals.

- S == "foo" is more readable than S.equals("foo"), especially for
  !Long.Expression.equals("str") vs Long.Expression != "str".</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I'm planning to remove StringRef::equals in favor of
StringRef::operator==.

- StringRef::operator== outnumbers StringRef::equals by a factor of 25
  under llvm/ in terms of their usage.

- The elimination of StringRef::equals brings StringRef closer to
  std::string_view, which has operator== but not equals.

- S == "foo" is more readable than S.equals("foo"), especially for
  !Long.Expression.equals("str") vs Long.Expression != "str".</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm][vfs] Make vfs::FileSystem::exists() virtual NFC (#88575)</title>
<updated>2024-04-12T20:34:47+00:00</updated>
<author>
<name>Artem Chikin</name>
<email>achikin@apple.com</email>
</author>
<published>2024-04-12T20:34:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=588987405a979f724ab0aa7ad788cc5e87af3649'/>
<id>588987405a979f724ab0aa7ad788cc5e87af3649</id>
<content type='text'>
Allow a `vfs::FileSystem` to provide a more efficient implementation of
`exists()` if they are able to. The existing `FileSystem`
implementations continue to default to using `status()` except that
overlay, proxy, and redirecting filesystems are taught to forward calls
to `exists()` correctly to their wrapped/external filesystem.

Co-authored-by: Ben Langmuir &lt;blangmuir@apple.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Allow a `vfs::FileSystem` to provide a more efficient implementation of
`exists()` if they are able to. The existing `FileSystem`
implementations continue to default to using `status()` except that
overlay, proxy, and redirecting filesystems are taught to forward calls
to `exists()` correctly to their wrapped/external filesystem.

Co-authored-by: Ben Langmuir &lt;blangmuir@apple.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm][vfs] NFCI: Remove `const` from `VFS::getRealPath()`</title>
<updated>2024-04-12T17:32:58+00:00</updated>
<author>
<name>Jan Svoboda</name>
<email>jan_svoboda@apple.com</email>
</author>
<published>2024-04-12T17:09:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=edd7fed9da48c0e708cce9bd4d305ae43d8bd77c'/>
<id>edd7fed9da48c0e708cce9bd4d305ae43d8bd77c</id>
<content type='text'>
This is an NFC change split from https://github.com/llvm/llvm-project/pull/68645.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is an NFC change split from https://github.com/llvm/llvm-project/pull/68645.
</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm][vfs] Preserve paths for fallback/fallthrough in RedirectingFileSystem (#85307)</title>
<updated>2024-03-15T16:01:41+00:00</updated>
<author>
<name>Ben Langmuir</name>
<email>blangmuir@apple.com</email>
</author>
<published>2024-03-15T16:01:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5a8a7ee9d12d7cd3680c7bc14a4750bd44d99c56'/>
<id>5a8a7ee9d12d7cd3680c7bc14a4750bd44d99c56</id>
<content type='text'>
When we lookup in the external filesystem, do not remove . and ..
components from the original path. For .. this is a correctness issue in
the presence of symlinks, while for . it is simply better practice to
preserve the original path to better match the behaviour of other
filesystems. The only modification we need is to apply the working
directory, since it could differ from the external filesystem.

rdar://123655660</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When we lookup in the external filesystem, do not remove . and ..
components from the original path. For .. this is a correctness issue in
the presence of symlinks, while for . it is simply better practice to
preserve the original path to better match the behaviour of other
filesystems. The only modification we need is to apply the working
directory, since it could differ from the external filesystem.

rdar://123655660</pre>
</div>
</content>
</entry>
<entry>
<title>[Support] Use StringRef::starts_with (NFC)</title>
<updated>2024-02-03T17:36:45+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2024-02-03T17:36:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8926af426f202c158dd17b2034c044e85eceb108'/>
<id>8926af426f202c158dd17b2034c044e85eceb108</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
