summaryrefslogtreecommitdiffstats
path: root/clang/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
commita04a46e8f45c1d6de6b5a47fc31562ea09bcecfd (patch)
treee132e9716fb8e5adbf373efdb8c64ec0548b1025 /clang/lib/Frontend/CompilerInstance.cpp
parent10312ab129d890df193755eaa5750132520b517a (diff)
downloadbcm5719-llvm-a04a46e8f45c1d6de6b5a47fc31562ea09bcecfd.tar.gz
bcm5719-llvm-a04a46e8f45c1d6de6b5a47fc31562ea09bcecfd.zip
Seriously ugly hack, part 2
llvm-svn: 141181
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index f14c2e30bc2..408ebbee439 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/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)
OpenPOWER on IntegriCloud