]> granicus.if.org Git - clang/commitdiff
Don't refresh stat() info for pcm files
authorBen Langmuir <blangmuir@apple.com>
Mon, 19 May 2014 17:04:28 +0000 (17:04 +0000)
committerBen Langmuir <blangmuir@apple.com>
Mon, 19 May 2014 17:04:28 +0000 (17:04 +0000)
Follow-up fix for 209138.  Actually, since we already have this file
open, we don't want to refresh the stat() info, since that might be
newer than what we have open (bad!).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209143 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Serialization/ModuleManager.cpp

index c3152c0b021655f5f7343dd474d2ea808c46c012..0130994ebc4dc1d953d1047a366556045a6d243d 100644 (file)
@@ -152,19 +152,7 @@ void ModuleManager::removeModules(ModuleIterator first, ModuleIterator last,
 
   // Delete the modules and erase them from the various structures.
   for (ModuleIterator victim = first; victim != last; ++victim) {
-    const FileEntry *F = (*victim)->File;
-    Modules.erase(F);
-
-    // Refresh the stat() information for the module file so stale information
-    // doesn't get stored accidentally.
-    vfs::Status UpdatedStat;
-    if (FileMgr.getNoncachedStatValue(F->getName(), UpdatedStat)) {
-      llvm::report_fatal_error(Twine("module file '") + F->getName() +
-                               "' removed after it has been used");
-    } else {
-      FileMgr.modifyFileEntry(const_cast<FileEntry *>(F), UpdatedStat.getSize(),
-          UpdatedStat.getLastModificationTime().toEpochTime());
-    }
+    Modules.erase((*victim)->File);
 
     if (modMap) {
       StringRef ModuleName = (*victim)->ModuleName;