Skip to content

Commit 0785f8d

Browse files
committed
Remove FileManager::invalidateCache as it has no callers anymore. NFC.
llvm-svn: 370400
1 parent 65f1c04 commit 0785f8d

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

clang/include/clang/Basic/FileManager.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,9 +338,6 @@ class FileManager : public RefCountedBase<FileManager> {
338338
std::error_code getNoncachedStatValue(StringRef Path,
339339
llvm::vfs::Status &Result);
340340

341-
/// Remove the real file \p Entry from the cache.
342-
void invalidateCache(const FileEntry *Entry);
343-
344341
/// If path is not absolute and FileSystemOptions set the working
345342
/// directory, the path is modified to be relative to the given
346343
/// working directory.

clang/lib/Basic/FileManager.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -498,20 +498,6 @@ FileManager::getNoncachedStatValue(StringRef Path,
498498
return std::error_code();
499499
}
500500

501-
void FileManager::invalidateCache(const FileEntry *Entry) {
502-
assert(Entry && "Cannot invalidate a NULL FileEntry");
503-
504-
SeenFileEntries.erase(Entry->getName());
505-
506-
// FileEntry invalidation should not block future optimizations in the file
507-
// caches. Possible alternatives are cache truncation (invalidate last N) or
508-
// invalidation of the whole cache.
509-
//
510-
// FIXME: This is broken. We sometimes have the same FileEntry* shared
511-
// between multiple SeenFileEntries, so this can leave dangling pointers.
512-
UniqueRealFiles.erase(Entry->getUniqueID());
513-
}
514-
515501
void FileManager::GetUniqueIDMapping(
516502
SmallVectorImpl<const FileEntry *> &UIDToFiles) const {
517503
UIDToFiles.clear();

0 commit comments

Comments
 (0)