aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward O'Callaghan <eocallaghan@auroraux.org>2009-11-24 15:23:21 +0000
committerEdward O'Callaghan <eocallaghan@auroraux.org>2009-11-24 15:23:21 +0000
commit56eec2bc2188574459a514f3650d581e00683126 (patch)
tree2dc5079fa5acbeeb578d04b369c19d2df2350756
parent87392c4919f7ff2653ffec8b915b4dc7099a69dc (diff)
Fix for PR5568.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89766 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Driver/Compilation.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Driver/Compilation.cpp b/lib/Driver/Compilation.cpp
index ffa627ad28..81b2cc5f37 100644
--- a/lib/Driver/Compilation.cpp
+++ b/lib/Driver/Compilation.cpp
@@ -85,9 +85,16 @@ bool Compilation::CleanupFileList(const ArgStringList &Files,
for (ArgStringList::const_iterator
it = Files.begin(), ie = Files.end(); it != ie; ++it) {
+
llvm::sys::Path P(*it);
std::string Error;
+ if (P.isSpecialFile()) {
+ // If we have a special file in our list, i.e. /dev/null
+ // then don't call eraseFromDisk() and just continue.
+ continue;
+ }
+
if (P.eraseFromDisk(false, &Error)) {
// Failure is only failure if the file doesn't exist. There is a
// race condition here due to the limited interface of