summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-10-05 14:58:46 +0000
committerDouglas Gregor <dgregor@apple.com>2011-10-05 14:58:46 +0000
commit10312ab129d890df193755eaa5750132520b517a (patch)
tree7492d3a952b116ba08913403d6da371245004d14 /clang/lib/Frontend/CompilerInstance.cpp
parent54a888108a147bb37d5a061e7ebb06c4889cb2b6 (diff)
downloadbcm5719-llvm-10312ab129d890df193755eaa5750132520b517a.tar.gz
bcm5719-llvm-10312ab129d890df193755eaa5750132520b517a.zip
Seriously ugly hack to try to get the Windows builders back online
llvm-svn: 141180
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index 32455c9d57a..f14c2e30bc2 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -880,10 +880,13 @@ void LockFileManager::waitForUnlock() {
if (getState() != LFS_Shared)
return;
+#if LLVM_ON_WIN32
+ unsigned long Interval = 1;
+#else
struct timespec Interval;
Interval.tv_sec = 0;
Interval.tv_nsec = 1000000;
-
+#endif
// Don't wait more than an hour for the file to appear.
const unsigned MaxSeconds = 3600;
do {
@@ -902,13 +905,23 @@ void LockFileManager::waitForUnlock() {
return;
// Exponentially increase the time we wait for the lock to be removed.
+#if LLVM_ON_WIN32
+ Interval *= 2;
+#else
Interval.tv_sec *= 2;
Interval.tv_nsec *= 2;
if (Interval.tv_nsec >= 1000000000) {
++Interval.tv_sec;
Interval.tv_nsec -= 1000000000;
}
- } while (Interval.tv_sec < MaxSeconds);
+#endif
+ } while (
+#if LLVM_ON_WIN32
+ Interval < MaxSeconds * 1000
+#else
+ Interval.tv_sec < MaxSeconds
+#endif
+ );
// Give up.
}
OpenPOWER on IntegriCloud