14#define DEBUG_TYPE "orc"
18namespace rt_bootstrap {
27 return make_error<StringError>(
"open: non-zero mode bits not yet supported",
30 const char *PathCStr = Path.empty() ? nullptr : Path.c_str();
37 std::lock_guard<std::mutex> Lock(M);
39 Dylibs.
insert(
DL.getOSSpecificHandle());
46 std::vector<ExecutorSymbolDef>
Result;
49 for (
const auto &
E : L) {
52 return make_error<StringError>(
"Required address for empty symbol \"\"",
58 const char *DemangledSymName =
E.Name.c_str();
60 if (
E.Name.front() !=
'_')
61 return make_error<StringError>(
Twine(
"MachO symbol \"") +
E.Name +
62 "\" missing leading '_'",
67 void *
Addr =
DL.getAddressOfSymbol(DemangledSymName);
68 if (!
Addr &&
E.Required)
69 return make_error<StringError>(
Twine(
"Missing definition for ") +
85 std::lock_guard<std::mutex> Lock(M);
103SimpleExecutorDylibManager::openWrapper(
const char *ArgData,
size_t ArgSize) {
105 WrapperFunction<rt::SPSSimpleExecutorDylibManagerOpenSignature>::handle(
113SimpleExecutorDylibManager::lookupWrapper(
const char *ArgData,
size_t ArgSize) {
115 WrapperFunction<rt::SPSSimpleExecutorDylibManagerLookupSignature>::handle(
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
static cl::opt< RegAllocEvictionAdvisorAnalysis::AdvisorMode > Mode("regalloc-enable-advisor", cl::Hidden, cl::init(RegAllocEvictionAdvisorAnalysis::AdvisorMode::Default), cl::desc("Enable regalloc advisor mode"), cl::values(clEnumValN(RegAllocEvictionAdvisorAnalysis::AdvisorMode::Default, "default", "Default"), clEnumValN(RegAllocEvictionAdvisorAnalysis::AdvisorMode::Release, "release", "precompiled"), clEnumValN(RegAllocEvictionAdvisorAnalysis::AdvisorMode::Development, "development", "for training")))
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
Tagged union holding either a T or a Error.
StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
std::pair< iterator, bool > insert(const ValueT &V)
Represents an address in the executor process.
static ExecutorAddr fromPtr(T *Ptr, UnwrapFn &&Unwrap=UnwrapFn())
Create an ExecutorAddr from the given pointer.
Represents a defining location for a JIT symbol.
Expected< std::vector< ExecutorSymbolDef > > lookup(tpctypes::DylibHandle H, const RemoteSymbolLookupSet &L)
virtual ~SimpleExecutorDylibManager()
Error shutdown() override
Expected< tpctypes::DylibHandle > open(const std::string &Path, uint64_t Mode)
void addBootstrapSymbols(StringMap< ExecutorAddr > &M) override
This class provides a portable interface to dynamic libraries which also might be known as shared lib...
static DynamicLibrary getPermanentLibrary(const char *filename, std::string *errMsg=nullptr)
This function permanently loads the dynamic library at the given path using the library load operatio...
const char * SimpleExecutorDylibManagerOpenWrapperName
const char * SimpleExecutorDylibManagerLookupWrapperName
const char * SimpleExecutorDylibManagerInstanceName
MethodWrapperHandler< RetT, ClassT, ArgTs... > makeMethodWrapperHandler(RetT(ClassT::*Method)(ArgTs...))
Create a MethodWrapperHandler object from the given method pointer.
std::vector< RemoteSymbolLookupSetElement > RemoteSymbolLookupSet
This is an optimization pass for GlobalISel generic memory operations.
std::error_code inconvertibleErrorCode()
The value returned by this function can be returned from convertToErrorCode for Error values where no...
void swap(llvm::BitVector &LHS, llvm::BitVector &RHS)
Implement std::swap in terms of BitVector swap.