r368762 - [clang][DirectoryWatcher] Fix Windows stub after LLVM change

Jan Korous via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 13 15:39:51 PDT 2019


Author: jkorous
Date: Tue Aug 13 15:39:50 2019
New Revision: 368762

URL: http://llvm.org/viewvc/llvm-project?rev=368762&view=rev
Log:
[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)

Modified:
    cfe/trunk/lib/DirectoryWatcher/windows/DirectoryWatcher-windows.cpp

Modified: cfe/trunk/lib/DirectoryWatcher/windows/DirectoryWatcher-windows.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/DirectoryWatcher/windows/DirectoryWatcher-windows.cpp?rev=368762&r1=368761&r2=368762&view=diff
==============================================================================
--- cfe/trunk/lib/DirectoryWatcher/windows/DirectoryWatcher-windows.cpp (original)
+++ cfe/trunk/lib/DirectoryWatcher/windows/DirectoryWatcher-windows.cpp Tue Aug 13 15:39:50 2019
@@ -40,9 +40,11 @@ public:
 };
 } // namespace
 
-std::unique_ptr<DirectoryWatcher> clang::DirectoryWatcher::create(
+llvm::Expected<std::unique_ptr<DirectoryWatcher>>
+clang::DirectoryWatcher::create(
     StringRef Path,
     std::function<void(llvm::ArrayRef<DirectoryWatcher::Event>, bool)> Receiver,
     bool WaitForInitialSync) {
-    return nullptr;
+  return llvm::Expected<std::unique_ptr<DirectoryWatcher>>(
+      llvm::errorCodeToError(std::make_error_code(std::errc::not_supported)));
 }




More information about the cfe-commits mailing list