diff options
author | Edward O'Callaghan <eocallaghan@auroraux.org> | 2009-11-24 15:23:21 +0000 |
---|---|---|
committer | Edward O'Callaghan <eocallaghan@auroraux.org> | 2009-11-24 15:23:21 +0000 |
commit | db521ec23b6de14bb833308c1d0b82f94e0670df (patch) | |
tree | 3930f054ae6d30c4d93f0f1d3f550bf077304057 /clang/lib | |
parent | dddf134a3cea47a2ab2ad7ede189d1fe29be7211 (diff) | |
download | bcm5719-llvm-db521ec23b6de14bb833308c1d0b82f94e0670df.tar.gz bcm5719-llvm-db521ec23b6de14bb833308c1d0b82f94e0670df.zip |
Fix for PR5568.
llvm-svn: 89766
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Driver/Compilation.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/Driver/Compilation.cpp b/clang/lib/Driver/Compilation.cpp index ffa627ad281..81b2cc5f372 100644 --- a/clang/lib/Driver/Compilation.cpp +++ b/clang/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 |