diff options
author | Jan Svoboda <jan_svoboda@apple.com> | 2024-01-24 17:41:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-24 08:41:14 -0800 |
commit | 6c1dbd5359c4336d03b11faeaea8459b421f2c5c (patch) | |
tree | 8fd263dfe71430a2438196751fb3bcf0ec8305d9 /llvm/lib/Support/VirtualFileSystem.cpp | |
parent | 56444d5687818938a6ce798e7221aa920c54098e (diff) | |
download | llvm-6c1dbd5359c4336d03b11faeaea8459b421f2c5c.zip llvm-6c1dbd5359c4336d03b11faeaea8459b421f2c5c.tar.gz llvm-6c1dbd5359c4336d03b11faeaea8459b421f2c5c.tar.bz2 |
[clang] NFC: Remove `{File,Directory}Entry::getName()` (#74910)
The files and directories that Clang accesses are uniqued by their
inode. For each inode `FileManager` will create exactly one `FileEntry`
or `DirectoryEntry` object, which makes answering the question _"Are
these two files/directories the same?"_ a simple pointer equality check.
However, since the same inode can be accessed through multiple different
paths, asking the `FileEntry` or `DirectoryEntry` object _"What is your
name?"_ doesn't have clear semantics. In c0ff9908 we started reporting
the most recent name used to access the entry, which turned out to be
necessary for Clang modules. However, the long-term solution has always
been to explicitly track the as-requested name. This has been
implemented in 4dc5573a as `FileEntryRef` and `DirectoryEntryRef`.
The `DirectoryEntry::getName()` interface has been deprecated since the
Clang 17 release and `FileEntry::getName()` since Clang 18. We have
replaced uses of these deprecated APIs in `main` with
`DirectoryEntryRef::getName()` and `FileEntryRef::getName()`
respectively.
This makes it possible to remove `{File,Directory}Entry::getName()` for
good along with the `FileManager` code that implements them.
Diffstat (limited to 'llvm/lib/Support/VirtualFileSystem.cpp')
-rw-r--r-- | llvm/lib/Support/VirtualFileSystem.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/llvm/lib/Support/VirtualFileSystem.cpp b/llvm/lib/Support/VirtualFileSystem.cpp index c43b70e..d6c787c 100644 --- a/llvm/lib/Support/VirtualFileSystem.cpp +++ b/llvm/lib/Support/VirtualFileSystem.cpp @@ -2334,7 +2334,6 @@ static Status getRedirectedFileStatus(const Twine &OriginalPath, S = Status::copyWithNewName(S, OriginalPath); else S.ExposesExternalVFSPath = true; - S.IsVFSMapped = true; return S; } |