[clang] [Basic] Remove getVirtualFile (PR #151086)
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 28 22:33:50 PDT 2025
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/151086
This patch removes getVirtualFile because it has been deprecated for
more than 10 months since:
commit b1aea98cfa357e23f4bb52232da5f41781f23bff
Author: Jan Svoboda <jan_svoboda at apple.com>
Date: Wed Sep 25 10:36:44 2024 -0700
I'm not aware of any downstream use AFAICT.
>From bae88a85900ac6aad1a5d56833e415c634ce0a63 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Sun, 27 Jul 2025 12:30:55 -0700
Subject: [PATCH] [Basic] Remove getVirtualFile
This patch removes getVirtualFile because it has been deprecated for
more than 10 months since:
commit b1aea98cfa357e23f4bb52232da5f41781f23bff
Author: Jan Svoboda <jan_svoboda at apple.com>
Date: Wed Sep 25 10:36:44 2024 -0700
I'm not aware of any downstream use AFAICT.
---
clang/include/clang/Basic/FileManager.h | 5 -----
clang/lib/Basic/FileManager.cpp | 5 -----
2 files changed, 10 deletions(-)
diff --git a/clang/include/clang/Basic/FileManager.h b/clang/include/clang/Basic/FileManager.h
index e83a61d6ff00c..337911e99b303 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 fc4ec785d3764..7481e1ee9f7ea 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;
More information about the cfe-commits
mailing list