diff options
-rw-r--r-- | lib/Driver/Compilation.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Driver/Compilation.cpp b/lib/Driver/Compilation.cpp index 066e88ebe1..446b2ed5f1 100644 --- a/lib/Driver/Compilation.cpp +++ b/lib/Driver/Compilation.cpp @@ -108,7 +108,7 @@ bool Compilation::CleanupFileList(const ArgStringList &Files, // FIXME: Grumble, P.exists() is broken. PR3837. struct stat buf; - if (::stat(P.c_str(), &buf) == 0 ? S_ISREG(buf.st_mode) : + if (::stat(P.c_str(), &buf) == 0 ? (buf.st_mode & S_IFMT) == S_IFREG : (errno != ENOENT)) { if (IssueErrors) getDriver().Diag(clang::diag::err_drv_unable_to_remove_file) |