aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-10-05 14:59:36 +0000
committerDouglas Gregor <dgregor@apple.com>2011-10-05 14:59:36 +0000
commit2572849d5ee3e5729a89ca934e1b04199eec5a5b (patch)
tree3e885f43d27818ce396d2ddf53f99be4047988e4 /lib/Frontend/CompilerInstance.cpp
parent1872e7916ce14a0a0b697eed534e27cb4d2b9ec2 (diff)
Seriously ugly hack, part 2
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141181 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInstance.cpp')
-rw-r--r--lib/Frontend/CompilerInstance.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp
index f14c2e30bc..408ebbee43 100644
--- a/lib/Frontend/CompilerInstance.cpp
+++ b/lib/Frontend/CompilerInstance.cpp
@@ -47,6 +47,9 @@
#include <sys/types.h>
#include <sys/stat.h>
+#if LLVM_ON_WIN32
+#include <windows.h>
+#endif
#if LLVM_ON_UNIX
#include <unistd.h>
#endif
@@ -894,8 +897,11 @@ void LockFileManager::waitForUnlock() {
// finish up and
// FIXME: Should we hook in to system APIs to get a notification when the
// lock file is deleted?
+#if LLVM_ON_WIN32
+ Sleep(Interval);
+#else
nanosleep(&Interval, NULL);
-
+#endif
// If the file no longer exists, we're done.
bool Exists = false;
if (!llvm::sys::fs::exists(LockFileName.str(), Exists) && !Exists)