浏览代码

[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
Jan Korous 6 年之前
父节点
当前提交
c74ed257d0
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      lib/DirectoryWatcher/windows/DirectoryWatcher-windows.cpp

+ 4 - 2
lib/DirectoryWatcher/windows/DirectoryWatcher-windows.cpp

@@ -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)));
 }