Author: jkorous Date: Tue Aug 13 15:39:26 2019 New Revision: 368761 URL: http://llvm.org/viewvc/llvm-project?rev=368761&view=rev Log: [clang] DirectoryWatcher for Windows stubs (to fix build break).
This is just a code skeleton for DirectoryWatcher-windows.cpp so the build on Windows stops breaking. (upstreamed from github.com/apple/swift-clang) Added: cfe/trunk/lib/DirectoryWatcher/windows/ cfe/trunk/lib/DirectoryWatcher/windows/DirectoryWatcher-windows.cpp Modified: cfe/trunk/lib/DirectoryWatcher/CMakeLists.txt Modified: cfe/trunk/lib/DirectoryWatcher/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/DirectoryWatcher/CMakeLists.txt?rev=368761&r1=368760&r2=368761&view=diff ============================================================================== --- cfe/trunk/lib/DirectoryWatcher/CMakeLists.txt (original) +++ cfe/trunk/lib/DirectoryWatcher/CMakeLists.txt Tue Aug 13 15:39:26 2019 @@ -17,6 +17,8 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "Linux" list(APPEND DIRECTORY_WATCHER_SOURCES linux/DirectoryWatcher-linux.cpp) find_package(Threads REQUIRED) endif() +elseif(CMAKE_SYSTEM_NAME MATCHES "Windows") + list(APPEND DIRECTORY_WATCHER_SOURCES windows/DirectoryWatcher-windows.cpp) else() list(APPEND DIRECTORY_WATCHER_SOURCES default/DirectoryWatcher-not-implemented.cpp) endif() Added: cfe/trunk/lib/DirectoryWatcher/windows/DirectoryWatcher-windows.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/DirectoryWatcher/windows/DirectoryWatcher-windows.cpp?rev=368761&view=auto ============================================================================== --- cfe/trunk/lib/DirectoryWatcher/windows/DirectoryWatcher-windows.cpp (added) +++ cfe/trunk/lib/DirectoryWatcher/windows/DirectoryWatcher-windows.cpp Tue Aug 13 15:39:26 2019 @@ -0,0 +1,48 @@ +//===- DirectoryWatcher-windows.cpp - Windows-platform directory watching -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// TODO: This is not yet an implementation, but it will make it so Windows +// builds don't fail. + +#include "DirectoryScanner.h" +#include "clang/DirectoryWatcher/DirectoryWatcher.h" + +#include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/ScopeExit.h" +#include "llvm/Support/AlignOf.h" +#include "llvm/Support/Errno.h" +#include "llvm/Support/Mutex.h" +#include "llvm/Support/Path.h" +#include <atomic> +#include <condition_variable> +#include <mutex> +#include <queue> +#include <string> +#include <thread> +#include <vector> + +namespace { + +using namespace llvm; +using namespace clang; + +class DirectoryWatcherWindows : public clang::DirectoryWatcher { +public: + ~DirectoryWatcherWindows() override { } + void InitialScan() { } + void EventReceivingLoop() { } + void StopWork() { } +}; +} // namespace + +std::unique_ptr<DirectoryWatcher> clang::DirectoryWatcher::create( + StringRef Path, + std::function<void(llvm::ArrayRef<DirectoryWatcher::Event>, bool)> Receiver, + bool WaitForInitialSync) { + return nullptr; +} _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits