From: Ben Langmuir Date: Mon, 19 May 2014 17:04:28 +0000 (+0000) Subject: Don't refresh stat() info for pcm files X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2e7f8bef22216e331116df5b492654d00cee4a25;p=clang Don't refresh stat() info for pcm files 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 --- diff --git a/lib/Serialization/ModuleManager.cpp b/lib/Serialization/ModuleManager.cpp index c3152c0b02..0130994ebc 100644 --- a/lib/Serialization/ModuleManager.cpp +++ b/lib/Serialization/ModuleManager.cpp @@ -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(F), UpdatedStat.getSize(), - UpdatedStat.getLastModificationTime().toEpochTime()); - } + Modules.erase((*victim)->File); if (modMap) { StringRef ModuleName = (*victim)->ModuleName;