[cfe-commits] r89766 - /cfe/trunk/lib/Driver/Compilation.cpp

Edward O'Callaghan eocallaghan at auroraux.org
Tue Nov 24 07:23:21 PST 2009


Author: evocallaghan
Date: Tue Nov 24 09:23:21 2009
New Revision: 89766

URL: http://llvm.org/viewvc/llvm-project?rev=89766&view=rev
Log:
Fix for PR5568.

Modified:
    cfe/trunk/lib/Driver/Compilation.cpp

Modified: cfe/trunk/lib/Driver/Compilation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Compilation.cpp?rev=89766&r1=89765&r2=89766&view=diff

==============================================================================
--- cfe/trunk/lib/Driver/Compilation.cpp (original)
+++ cfe/trunk/lib/Driver/Compilation.cpp Tue Nov 24 09:23:21 2009
@@ -85,9 +85,16 @@
 
   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





More information about the cfe-commits mailing list