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/Errno.h" 18 #include "llvm/Support/Mutex.h" 19 #include "llvm/Support/Path.h" 20 #include <atomic> 21 #include <condition_variable> 22 #include <mutex> 23 #include <queue> 24 #include <string> 25 #include <thread> 26 #include <vector> 27 28 namespace { 29 30 using namespace llvm; 31 using namespace clang; 32 33 class DirectoryWatcherWindows : public clang::DirectoryWatcher { 34 public: ~DirectoryWatcherWindows()35 ~DirectoryWatcherWindows() override { } InitialScan()36 void InitialScan() { } EventReceivingLoop()37 void EventReceivingLoop() { } StopWork()38 void StopWork() { } 39 }; 40 } // namespace 41 42 llvm::Expected<std::unique_ptr<DirectoryWatcher>> create(StringRef Path,std::function<void (llvm::ArrayRef<DirectoryWatcher::Event>,bool)> Receiver,bool WaitForInitialSync)43clang::DirectoryWatcher::create( 44 StringRef Path, 45 std::function<void(llvm::ArrayRef<DirectoryWatcher::Event>, bool)> Receiver, 46 bool WaitForInitialSync) { 47 return llvm::Expected<std::unique_ptr<DirectoryWatcher>>( 48 llvm::errorCodeToError(std::make_error_code(std::errc::not_supported))); 49 } 50