summaryrefslogtreecommitdiff
path: root/lib/Serialization/ModuleManager.cpp
diff options
context:
space:
mode:
authorBen Langmuir <blangmuir@apple.com>2014-05-19 17:04:28 +0000
committerBen Langmuir <blangmuir@apple.com>2014-05-19 17:04:28 +0000
commit2e7f8bef22216e331116df5b492654d00cee4a25 (patch)
tree480d44a9d10591ada5aec89d535102e4ba7903da /lib/Serialization/ModuleManager.cpp
parent1919a364f04e8a1d56f213579330e88014b26a65 (diff)
downloadclang-2e7f8bef22216e331116df5b492654d00cee4a25.tar.gz
clang-2e7f8bef22216e331116df5b492654d00cee4a25.tar.bz2
clang-2e7f8bef22216e331116df5b492654d00cee4a25.tar.xz
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
Diffstat (limited to 'lib/Serialization/ModuleManager.cpp')
-rw-r--r--lib/Serialization/ModuleManager.cpp14
1 files changed, 1 insertions, 13 deletions
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<FileEntry *>(F), UpdatedStat.getSize(),
- UpdatedStat.getLastModificationTime().toEpochTime());
- }
+ Modules.erase((*victim)->File);
if (modMap) {
StringRef ModuleName = (*victim)->ModuleName;