1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

[llvm-jitlink] Fix -Wunused-function on Windows

Reviewed By: sgraenitz

Differential Revision: https://reviews.llvm.org/D99604
This commit is contained in:
Arthur Eubanks 2021-03-30 09:30:05 -07:00
parent ac42de94f4
commit 2e601b2808

View File

@ -670,6 +670,7 @@ LLVMJITLinkRemoteTargetProcessControl::LaunchExecutor() {
#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 Error createTCPSocketError(Twine Details) {
}
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 @@ static Expected<int> connectTCPSocket(std::string Host, std::string PortStr) {
return createTCPSocketError(std::strerror(errno));
return SockFD;
#endif
}
#endif
Expected<std::unique_ptr<TargetProcessControl>>
LLVMJITLinkRemoteTargetProcessControl::ConnectToExecutor() {