[cfe-commits] r117779 - /cfe/trunk/lib/Driver/Compilation.cpp
Benjamin Kramer
benny.kra at googlemail.com
Sat Oct 30 01:28:42 PDT 2010
Author: d0k
Date: Sat Oct 30 03:28:42 2010
New Revision: 117779
URL: http://llvm.org/viewvc/llvm-project?rev=117779&view=rev
Log:
Use the expanded form of S_ISREG. Hopefully this unbreaks the MSVC build.
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=117779&r1=117778&r2=117779&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Compilation.cpp (original)
+++ cfe/trunk/lib/Driver/Compilation.cpp Sat Oct 30 03:28:42 2010
@@ -108,7 +108,7 @@
// 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)
More information about the cfe-commits
mailing list