Skip to content

Conversation

@kazutakahirata
Copy link
Contributor

This patch removes getVirtualFile because it has been deprecated for
more than 10 months since:

commit b1aea98
Author: Jan Svoboda [email protected]
Date: Wed Sep 25 10:36:44 2024 -0700

I'm not aware of any downstream use AFAICT.

This patch removes getVirtualFile because it has been deprecated for
more than 10 months since:

  commit b1aea98
  Author: Jan Svoboda <[email protected]>
  Date:   Wed Sep 25 10:36:44 2024 -0700

I'm not aware of any downstream use AFAICT.
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:frontend Language frontend issues, e.g. anything involving "Sema" labels Jul 29, 2025
@llvmbot
Copy link
Member

llvmbot commented Jul 29, 2025

@llvm/pr-subscribers-clang

Author: Kazu Hirata (kazutakahirata)

Changes

This patch removes getVirtualFile because it has been deprecated for
more than 10 months since:

commit b1aea98
Author: Jan Svoboda <[email protected]>
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 --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;

@kazutakahirata kazutakahirata merged commit 99fda1a into llvm:main Jul 29, 2025
12 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_20250728_clang_getVirtualFile branch July 29, 2025 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang:frontend Language frontend issues, e.g. anything involving "Sema" clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants