Explorar o código

Remove `FileManager::invalidateCache` as it has no callers anymore. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@370400 91177308-0d34-0410-b5e6-96231b3b80d8
Volodymyr Sapsai %!s(int64=6) %!d(string=hai) anos
pai
achega
013afbd7af
Modificáronse 2 ficheiros con 0 adicións e 17 borrados
  1. 0 3
      include/clang/Basic/FileManager.h
  2. 0 14
      lib/Basic/FileManager.cpp

+ 0 - 3
include/clang/Basic/FileManager.h

@@ -338,9 +338,6 @@ public:
   std::error_code getNoncachedStatValue(StringRef Path,
   std::error_code getNoncachedStatValue(StringRef Path,
                                         llvm::vfs::Status &Result);
                                         llvm::vfs::Status &Result);
 
 
-  /// Remove the real file \p Entry from the cache.
-  void invalidateCache(const FileEntry *Entry);
-
   /// If path is not absolute and FileSystemOptions set the working
   /// If path is not absolute and FileSystemOptions set the working
   /// directory, the path is modified to be relative to the given
   /// directory, the path is modified to be relative to the given
   /// working directory.
   /// working directory.

+ 0 - 14
lib/Basic/FileManager.cpp

@@ -498,20 +498,6 @@ FileManager::getNoncachedStatValue(StringRef Path,
   return std::error_code();
   return std::error_code();
 }
 }
 
 
-void FileManager::invalidateCache(const FileEntry *Entry) {
-  assert(Entry && "Cannot invalidate a NULL FileEntry");
-
-  SeenFileEntries.erase(Entry->getName());
-
-  // FileEntry invalidation should not block future optimizations in the file
-  // caches. Possible alternatives are cache truncation (invalidate last N) or
-  // invalidation of the whole cache.
-  //
-  // FIXME: This is broken. We sometimes have the same FileEntry* shared
-  // between multiple SeenFileEntries, so this can leave dangling pointers.
-  UniqueRealFiles.erase(Entry->getUniqueID());
-}
-
 void FileManager::GetUniqueIDMapping(
 void FileManager::GetUniqueIDMapping(
                    SmallVectorImpl<const FileEntry *> &UIDToFiles) const {
                    SmallVectorImpl<const FileEntry *> &UIDToFiles) const {
   UIDToFiles.clear();
   UIDToFiles.clear();