diff options
author | Ben Langmuir <blangmuir@apple.com> | 2014-05-20 05:55:04 +0000 |
---|---|---|
committer | Ben Langmuir <blangmuir@apple.com> | 2014-05-20 05:55:04 +0000 |
commit | 5988590363f4c438586785f4895812751adc60b6 (patch) | |
tree | 0b82815d7429344031b9f191b3fdaea35e139b4c /clang/lib/Serialization/ModuleManager.cpp | |
parent | 4a6f58380a23c7d510861937e7814593783745d8 (diff) | |
download | llvm-5988590363f4c438586785f4895812751adc60b6.zip llvm-5988590363f4c438586785f4895812751adc60b6.tar.gz llvm-5988590363f4c438586785f4895812751adc60b6.tar.bz2 |
Speculative fix for Windows buildbot after r209138
It appears that Windows doesn't like renaming over open files, which we
do in clearOutputFiles. The file being compiled should be safe to
removed, but this isn't very satisfying - we don't want to manually
manage the lifetime of files we cannot prove have no references.
llvm-svn: 209195
Diffstat (limited to 'clang/lib/Serialization/ModuleManager.cpp')
-rw-r--r-- | clang/lib/Serialization/ModuleManager.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ModuleManager.cpp b/clang/lib/Serialization/ModuleManager.cpp index 0130994..43c250b 100644 --- a/clang/lib/Serialization/ModuleManager.cpp +++ b/clang/lib/Serialization/ModuleManager.cpp @@ -140,6 +140,11 @@ void ModuleManager::removeModules(ModuleIterator first, ModuleIterator last, if (first == last) return; + // The first file entry is about to be rebuilt (or there was an error), so + // there should be no references to it. Remove it from the cache to close it, + // as Windows doesn't seem to allow renaming over an open file. + FileMgr.invalidateCache((*first)->File); + // Collect the set of module file pointers that we'll be removing. llvm::SmallPtrSet<ModuleFile *, 4> victimSet(first, last); |