From: Jan Korous Date: Tue, 13 Aug 2019 22:39:50 +0000 (+0000) Subject: [clang][DirectoryWatcher] Fix Windows stub after LLVM change X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c74ed257d05802bb8056318dc26a75a2c20cb415;p=clang [clang][DirectoryWatcher] Fix Windows stub after LLVM change r367979 changed DirectoryWatcher::Create to return an llvm::Expected. Adjust the Windows stub accordingly. (upstreamed from github.com/apple/swift-clang) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@368762 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/DirectoryWatcher/windows/DirectoryWatcher-windows.cpp b/lib/DirectoryWatcher/windows/DirectoryWatcher-windows.cpp index 6a12715592..25cbcf5363 100644 --- a/lib/DirectoryWatcher/windows/DirectoryWatcher-windows.cpp +++ b/lib/DirectoryWatcher/windows/DirectoryWatcher-windows.cpp @@ -40,9 +40,11 @@ public: }; } // namespace -std::unique_ptr clang::DirectoryWatcher::create( +llvm::Expected> +clang::DirectoryWatcher::create( StringRef Path, std::function, bool)> Receiver, bool WaitForInitialSync) { - return nullptr; + return llvm::Expected>( + llvm::errorCodeToError(std::make_error_code(std::errc::not_supported))); }