diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2010-10-30 08:28:42 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2010-10-30 08:28:42 +0000 |
commit | d99d0e8276dd320deaee02824602bc335ea1c770 (patch) | |
tree | 7bbc0165a08bc6a87e71aab36899090e50b3a05d /lib/Driver/Compilation.cpp | |
parent | 61139c561f1a2c872209e32ff9143487cebf4324 (diff) |
Use the expanded form of S_ISREG. Hopefully this unbreaks the MSVC build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117779 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Compilation.cpp')
-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) |