diff options
author | Nico Weber <nicolasweber@gmx.de> | 2018-04-27 19:11:14 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2018-04-27 19:11:14 +0000 |
commit | 1865df49960e34cc90d0083b0e0cd4771c0feb35 (patch) | |
tree | e6c91dba6b86e3fc8970a42e8291771e32f82239 /clang/unittests/Basic/FileManagerTest.cpp | |
parent | ee5be798dae30d5f9414b01f76ff807edbc881aa (diff) | |
download | bcm5719-llvm-1865df49960e34cc90d0083b0e0cd4771c0feb35.tar.gz bcm5719-llvm-1865df49960e34cc90d0083b0e0cd4771c0feb35.zip |
s/LLVM_ON_WIN32/_WIN32/, clang
LLVM_ON_WIN32 is set exactly with MSVC and MinGW (but not Cygwin) in
HandleLLVMOptions.cmake, which is where _WIN32 defined too. Just use the
default macro instead of a reinvented one.
See thread "Replacing LLVM_ON_WIN32 with just _WIN32" on llvm-dev and cfe-dev.
No intended behavior change.
llvm-svn: 331069
Diffstat (limited to 'clang/unittests/Basic/FileManagerTest.cpp')
-rw-r--r-- | clang/unittests/Basic/FileManagerTest.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/clang/unittests/Basic/FileManagerTest.cpp b/clang/unittests/Basic/FileManagerTest.cpp index a2a6c6aebe4..5b7a7db4400 100644 --- a/clang/unittests/Basic/FileManagerTest.cpp +++ b/clang/unittests/Basic/FileManagerTest.cpp @@ -31,7 +31,7 @@ private: llvm::StringMap<FileData, llvm::BumpPtrAllocator> StatCalls; void InjectFileOrDirectory(const char *Path, ino_t INode, bool IsFile) { -#ifndef LLVM_ON_WIN32 +#ifndef _WIN32 SmallString<128> NormalizedPath(Path); llvm::sys::path::native(NormalizedPath); Path = NormalizedPath.c_str(); @@ -63,7 +63,7 @@ public: LookupResult getStat(StringRef Path, FileData &Data, bool isFile, std::unique_ptr<vfs::File> *F, vfs::FileSystem &FS) override { -#ifndef LLVM_ON_WIN32 +#ifndef _WIN32 SmallString<128> NormalizedPath(Path); llvm::sys::path::native(NormalizedPath); Path = NormalizedPath.c_str(); @@ -143,7 +143,7 @@ TEST_F(FileManagerTest, getFileReturnsValidFileEntryForExistingRealFile) { statCache->InjectDirectory("/tmp", 42); statCache->InjectFile("/tmp/test", 43); -#ifdef LLVM_ON_WIN32 +#ifdef _WIN32 const char *DirName = "C:."; const char *FileName = "C:test"; statCache->InjectDirectory(DirName, 44); @@ -161,7 +161,7 @@ TEST_F(FileManagerTest, getFileReturnsValidFileEntryForExistingRealFile) { ASSERT_TRUE(dir != nullptr); EXPECT_EQ("/tmp", dir->getName()); -#ifdef LLVM_ON_WIN32 +#ifdef _WIN32 file = manager.getFile(FileName); ASSERT_TRUE(file != NULL); @@ -225,7 +225,7 @@ TEST_F(FileManagerTest, getFileReturnsNULLForNonexistentFile) { // 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) { @@ -295,11 +295,11 @@ TEST_F(FileManagerTest, getVirtualFileWithDifferentName) { EXPECT_EQ(123, file2->getSize()); } -#endif // !LLVM_ON_WIN32 +#endif // !_WIN32 TEST_F(FileManagerTest, makeAbsoluteUsesVFS) { SmallString<64> CustomWorkingDir; -#ifdef LLVM_ON_WIN32 +#ifdef _WIN32 CustomWorkingDir = "C:"; #else CustomWorkingDir = "/"; |