[PATCH] D99604: [llvm-jitlink] Fix -Wunused-function on Windows

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 31 09:26:39 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG09b2419360e1: [llvm-jitlink] Fix -Wunused-function on Windows (authored by aeubanks).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99604/new/

https://reviews.llvm.org/D99604

Files:
  llvm/tools/llvm-jitlink/llvm-jitlink.cpp


Index: llvm/tools/llvm-jitlink/llvm-jitlink.cpp
===================================================================
--- llvm/tools/llvm-jitlink/llvm-jitlink.cpp
+++ llvm/tools/llvm-jitlink/llvm-jitlink.cpp
@@ -670,6 +670,7 @@
 #endif
 }
 
+#ifdef LLVM_ON_UNIX
 static Error createTCPSocketError(Twine Details) {
   return make_error<StringError>(
       formatv("Failed to connect TCP socket '{0}': {1}",
@@ -678,12 +679,6 @@
 }
 
 static Expected<int> connectTCPSocket(std::string Host, std::string PortStr) {
-#ifndef LLVM_ON_UNIX
-  // FIXME: Add TCP support for Windows.
-  return make_error<StringError>("-" + OutOfProcessExecutorConnect.ArgStr +
-                                     " not supported on non-unix platforms",
-                                 inconvertibleErrorCode());
-#else
   addrinfo *AI;
   addrinfo Hints{};
   Hints.ai_family = AF_INET;
@@ -718,8 +713,8 @@
     return createTCPSocketError(std::strerror(errno));
 
   return SockFD;
-#endif
 }
+#endif
 
 Expected<std::unique_ptr<TargetProcessControl>>
 LLVMJITLinkRemoteTargetProcessControl::ConnectToExecutor() {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99604.334463.patch
Type: text/x-patch
Size: 1094 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210331/22d16fe3/attachment.bin>


More information about the llvm-commits mailing list