diff options
Diffstat (limited to 'clang/lib/Driver/Compilation.cpp')
-rw-r--r-- | clang/lib/Driver/Compilation.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Driver/Compilation.cpp b/clang/lib/Driver/Compilation.cpp index f550a2746e4..9c7100fb80c 100644 --- a/clang/lib/Driver/Compilation.cpp +++ b/clang/lib/Driver/Compilation.cpp @@ -210,9 +210,9 @@ bool Compilation::CleanupFileList(const ArgStringList &Files, std::string Error; // Don't try to remove files which we don't have write access to (but may be - // able to remove). Underlying tools may have intentionally not overwritten - // them. - if (!P.canWrite()) + // able to remove), or non-regular files. Underlying tools may have + // intentionally not overwritten them. + if (!P.canWrite() || !P.isRegularFile()) continue; if (P.eraseFromDisk(false, &Error)) { |