From 1569ce68681d909594d64f9b056d71f5dd7563bf Mon Sep 17 00:00:00 2001 From: Roman Divacky Date: Tue, 1 Dec 2009 11:08:04 +0000 Subject: Update clang to r90226. --- lib/Driver/Compilation.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/Driver/Compilation.cpp') diff --git a/lib/Driver/Compilation.cpp b/lib/Driver/Compilation.cpp index ffa627ad28108..b819cda89c09b 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.isRegularFile()) { + // 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 -- cgit v1.3