[clang] [Basic] Remove getVirtualFile (PR #151086)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 28 22:34:25 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
This patch removes getVirtualFile because it has been deprecated for
more than 10 months since:
commit b1aea98cfa357e23f4bb52232da5f41781f23bff
Author: Jan Svoboda <jan_svoboda@<!-- -->apple.com>
Date: Wed Sep 25 10:36:44 2024 -0700
I'm not aware of any downstream use AFAICT.
---
Full diff: https://github.com/llvm/llvm-project/pull/151086.diff
2 Files Affected:
- (modified) clang/include/clang/Basic/FileManager.h (-5)
- (modified) clang/lib/Basic/FileManager.cpp (-5)
``````````diff
diff --git a/clang/include/clang/Basic/FileManager.h b/clang/include/clang/Basic/FileManager.h
index e83a61d6ff00cd..337911e99b303f 100644
--- a/clang/include/clang/Basic/FileManager.h
+++ b/clang/include/clang/Basic/FileManager.h
@@ -237,11 +237,6 @@ class FileManager : public RefCountedBase<FileManager> {
FileEntryRef getVirtualFileRef(StringRef Filename, off_t Size,
time_t ModificationTime);
- LLVM_DEPRECATED("Functions returning FileEntry are deprecated.",
- "getVirtualFileRef()")
- const FileEntry *getVirtualFile(StringRef Filename, off_t Size,
- time_t ModificationTime);
-
/// Retrieve a FileEntry that bypasses VFE, which is expected to be a virtual
/// file entry, to access the real file. The returned FileEntry will have
/// the same filename as FE but a different identity and its own stat.
diff --git a/clang/lib/Basic/FileManager.cpp b/clang/lib/Basic/FileManager.cpp
index fc4ec785d37647..7481e1ee9f7ea6 100644
--- a/clang/lib/Basic/FileManager.cpp
+++ b/clang/lib/Basic/FileManager.cpp
@@ -368,11 +368,6 @@ void FileManager::trackVFSUsage(bool Active) {
});
}
-const FileEntry *FileManager::getVirtualFile(StringRef Filename, off_t Size,
- time_t ModificationTime) {
- return &getVirtualFileRef(Filename, Size, ModificationTime).getFileEntry();
-}
-
FileEntryRef FileManager::getVirtualFileRef(StringRef Filename, off_t Size,
time_t ModificationTime) {
++NumFileLookups;
``````````
</details>
https://github.com/llvm/llvm-project/pull/151086
More information about the cfe-commits
mailing list