[cfe-commits] r133794 - /cfe/trunk/unittests/Basic/FileManagerTest.cpp

NAKAMURA Takumi geek4civic at gmail.com
Fri Jun 24 07:10:29 PDT 2011


Author: chapuni
Date: Fri Jun 24 09:10:29 2011
New Revision: 133794

URL: http://llvm.org/viewvc/llvm-project?rev=133794&view=rev
Log:
unittests/Basic/FileManagerTest.cpp: Unbreak Win32, mingw and msvc.

LLVM_ON_WIN32 is defined in llvm/Config/config.h.
IMO, it might be enough with _WIN32 in most cases, LLVM_ON_xxx could be deprecated.

Modified:
    cfe/trunk/unittests/Basic/FileManagerTest.cpp

Modified: cfe/trunk/unittests/Basic/FileManagerTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Basic/FileManagerTest.cpp?rev=133794&r1=133793&r2=133794&view=diff
==============================================================================
--- cfe/trunk/unittests/Basic/FileManagerTest.cpp (original)
+++ cfe/trunk/unittests/Basic/FileManagerTest.cpp Fri Jun 24 09:10:29 2011
@@ -30,7 +30,7 @@
   void InjectFileOrDirectory(const char *Path, ino_t INode, bool IsFile) {
     struct stat statBuf = {};
     statBuf.st_dev = 1;
-#ifndef LLVM_ON_WIN32  // struct stat has no st_ino field on Windows.
+#ifndef _WIN32  // struct stat has no st_ino field on Windows.
     statBuf.st_ino = INode;
 #endif
     statBuf.st_mode = IsFile ? (0777 | S_IFREG)  // a regular file
@@ -187,7 +187,7 @@
 
 // The following tests apply to Unix-like system only.
 
-#ifndef LLVM_ON_WIN32
+#ifndef _WIN32
 
 // getFile() returns the same FileEntry for real files that are aliases.
 TEST_F(FileManagerTest, getFileReturnsSameFileEntryForAliasedRealFiles) {
@@ -217,6 +217,6 @@
   EXPECT_EQ(manager.getFile("abc/foo.cpp"), manager.getFile("abc/bar.cpp"));
 }
 
-#endif  // !LLVM_ON_WIN32
+#endif  // !_WIN32
 
 } // anonymous namespace





More information about the cfe-commits mailing list