]> granicus.if.org Git - clang/commitdiff
Seriously ugly hack, part 2
authorDouglas Gregor <dgregor@apple.com>
Wed, 5 Oct 2011 14:59:36 +0000 (14:59 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 5 Oct 2011 14:59:36 +0000 (14:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141181 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/CompilerInstance.cpp

index f14c2e30bc2305e5f8f3064aef47ac08b8bf30f9..408ebbee4395b8be14bb16fb6e275f688c813b00 100644 (file)
@@ -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)