xref: /freebsd/contrib/llvm-project/clang/lib/DirectoryWatcher/windows/DirectoryWatcher-windows.cpp (revision fe815331bb40604ba31312acf7e4619674631777)
1 //===- DirectoryWatcher-windows.cpp - Windows-platform directory watching -===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 // TODO: This is not yet an implementation, but it will make it so Windows
10 //       builds don't fail.
11 
12 #include "DirectoryScanner.h"
13 #include "clang/DirectoryWatcher/DirectoryWatcher.h"
14 
15 #include "llvm/ADT/STLExtras.h"
16 #include "llvm/ADT/ScopeExit.h"
17 #include "llvm/Support/AlignOf.h"
18 #include "llvm/Support/Errno.h"
19 #include "llvm/Support/Mutex.h"
20 #include "llvm/Support/Path.h"
21 #include <atomic>
22 #include <condition_variable>
23 #include <mutex>
24 #include <queue>
25 #include <string>
26 #include <thread>
27 #include <vector>
28 
29 namespace {
30 
31 using namespace llvm;
32 using namespace clang;
33 
34 class DirectoryWatcherWindows : public clang::DirectoryWatcher {
35 public:
36   ~DirectoryWatcherWindows() override { }
37   void InitialScan() { }
38   void EventReceivingLoop() { }
39   void StopWork() { }
40 };
41 } // namespace
42 
43 llvm::Expected<std::unique_ptr<DirectoryWatcher>>
44 clang::DirectoryWatcher::create(
45     StringRef Path,
46     std::function<void(llvm::ArrayRef<DirectoryWatcher::Event>, bool)> Receiver,
47     bool WaitForInitialSync) {
48   return llvm::Expected<std::unique_ptr<DirectoryWatcher>>(
49       llvm::errorCodeToError(std::make_error_code(std::errc::not_supported)));
50 }
51