diff options
author | Nico Weber <nicolasweber@gmx.de> | 2018-04-29 00:45:03 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2018-04-29 00:45:03 +0000 |
commit | 712e8d29c4a52abded4414f673b51dd53dd018f1 (patch) | |
tree | 4b99dbe86251f1a62c3aefd587e57aa540795ee6 /llvm/lib/Support/LockFileManager.cpp | |
parent | d3d3d6b75d43c52eaa2bcbe5bab7be10ff329695 (diff) | |
download | bcm5719-llvm-712e8d29c4a52abded4414f673b51dd53dd018f1.tar.gz bcm5719-llvm-712e8d29c4a52abded4414f673b51dd53dd018f1.zip |
s/LLVM_ON_WIN32/_WIN32/, llvm
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.
This moves over all uses of the macro, but doesn't remove the definition
of it in (llvm-)config.h yet.
llvm-svn: 331127
Diffstat (limited to 'llvm/lib/Support/LockFileManager.cpp')
-rw-r--r-- | llvm/lib/Support/LockFileManager.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Support/LockFileManager.cpp b/llvm/lib/Support/LockFileManager.cpp index 74cb8fea408..4f7ebd408fe 100644 --- a/llvm/lib/Support/LockFileManager.cpp +++ b/llvm/lib/Support/LockFileManager.cpp @@ -25,7 +25,7 @@ #include <sys/types.h> #include <system_error> #include <tuple> -#if LLVM_ON_WIN32 +#if _WIN32 #include <windows.h> #endif #if LLVM_ON_UNIX @@ -258,7 +258,7 @@ LockFileManager::WaitForUnlockResult LockFileManager::waitForUnlock() { if (getState() != LFS_Shared) return Res_Success; -#if LLVM_ON_WIN32 +#if _WIN32 unsigned long Interval = 1; #else struct timespec Interval; @@ -273,7 +273,7 @@ LockFileManager::WaitForUnlockResult LockFileManager::waitForUnlock() { // finish up and remove the lock file. // FIXME: Should we hook in to system APIs to get a notification when the // lock file is deleted? -#if LLVM_ON_WIN32 +#if _WIN32 Sleep(Interval); #else nanosleep(&Interval, nullptr); @@ -292,7 +292,7 @@ LockFileManager::WaitForUnlockResult LockFileManager::waitForUnlock() { return Res_OwnerDied; // Exponentially increase the time we wait for the lock to be removed. -#if LLVM_ON_WIN32 +#if _WIN32 Interval *= 2; #else Interval.tv_sec *= 2; @@ -303,7 +303,7 @@ LockFileManager::WaitForUnlockResult LockFileManager::waitForUnlock() { } #endif } while ( -#if LLVM_ON_WIN32 +#if _WIN32 Interval < MaxSeconds * 1000 #else Interval.tv_sec < (time_t)MaxSeconds |