Skip to content
Snippets Groups Projects
Commit 2e7f8bef authored by Ben Langmuir's avatar Ben Langmuir
Browse files

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
parent 1919a364
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment