[llvm] [LLVM][Support] Fixed the compile error caused by #73603 (PR #75418)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 13 17:50:02 PST 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-support
Author: Shilei Tian (shiltian)
<details>
<summary>Changes</summary>
This patch fixed the following compile error caused by #<!-- -->73603.
```
llvm/lib/Support/raw_ostream.cpp: In static member function ‘static llvm::Expected<llvm::ListeningSocket> llvm::ListeningSocket::createUnix(llvm::StringRef, int)’:
llvm/lib/Support/raw_ostream.cpp:1040:10: error: could not convert ‘ListenSocket’ from ‘llvm::ListeningSocket’ to ‘llvm::Expected<llvm::ListeningSocket>’
return ListenSocket;
^~~~~~~~~~~~
```
---
Full diff: https://github.com/llvm/llvm-project/pull/75418.diff
1 Files Affected:
- (modified) llvm/lib/Support/raw_ostream.cpp (+1-2)
``````````diff
diff --git a/llvm/lib/Support/raw_ostream.cpp b/llvm/lib/Support/raw_ostream.cpp
index d7a1f91a27defc..8c59ee21782735 100644
--- a/llvm/lib/Support/raw_ostream.cpp
+++ b/llvm/lib/Support/raw_ostream.cpp
@@ -1036,8 +1036,7 @@ Expected<ListeningSocket> ListeningSocket::createUnix(StringRef SocketPath,
#else
UnixSocket = MaybeWinsocket;
#endif // _WIN32
- ListeningSocket ListenSocket(UnixSocket, SocketPath);
- return ListenSocket;
+ return ListeningSocket{UnixSocket, SocketPath};
}
Expected<std::unique_ptr<raw_socket_stream>> ListeningSocket::accept() {
``````````
</details>
https://github.com/llvm/llvm-project/pull/75418
More information about the llvm-commits
mailing list