[llvm-shlib] Fix the version naming style of libLLVM for Windows (#85710)
[llvm-project.git] / llvm / examples / OrcV2Examples / LLJITWithRemoteDebugging / RemoteJITUtils.h
blob3663307109bdb714e8300107a6e681ed1c544ecb
1 //===-- RemoteJITUtils.h - Utilities for remote-JITing ----------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // Utilities for ExecutorProcessControl-based remote JITing with Orc and
10 // JITLink.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_EXAMPLES_ORCV2EXAMPLES_LLJITWITHREMOTEDEBUGGING_REMOTEJITUTILS_H
15 #define LLVM_EXAMPLES_ORCV2EXAMPLES_LLJITWITHREMOTEDEBUGGING_REMOTEJITUTILS_H
17 #include "llvm/ADT/StringRef.h"
18 #include "llvm/ExecutionEngine/Orc/Core.h"
19 #include "llvm/ExecutionEngine/Orc/Layer.h"
20 #include "llvm/ExecutionEngine/Orc/SimpleRemoteEPC.h"
21 #include "llvm/Support/Error.h"
23 #include <cstdint>
24 #include <memory>
25 #include <string>
27 /// Find the default exectuable on disk and create a JITLinkExecutor for it.
28 std::string findLocalExecutor(const char *HostArgv0);
30 llvm::Expected<std::pair<std::unique_ptr<llvm::orc::SimpleRemoteEPC>, uint64_t>>
31 launchLocalExecutor(llvm::StringRef ExecutablePath);
33 /// Create a JITLinkExecutor that connects to the given network address
34 /// through a TCP socket. A valid NetworkAddress provides hostname and port,
35 /// e.g. localhost:20000.
36 llvm::Expected<std::unique_ptr<llvm::orc::SimpleRemoteEPC>>
37 connectTCPSocket(llvm::StringRef NetworkAddress);
39 llvm::Expected<std::unique_ptr<llvm::orc::DefinitionGenerator>>
40 loadDylib(llvm::orc::ExecutionSession &ES, llvm::StringRef RemotePath);
42 #endif