Go to the documentation of this file.
14 Expected<std::unique_ptr<TPCDynamicLibrarySearchGenerator>>
16 const char *LibraryPath,
20 return Handle.takeError();
22 return std::make_unique<TPCDynamicLibrarySearchGenerator>(TPC, *Handle,
35 for (
auto &KV : Symbols) {
37 if (Allow && !Allow(KV.first))
47 return Result.takeError();
49 assert(Result->size() == 1 &&
"Results for more than one library returned");
50 assert(Result->front().size() == LookupSymbols.
size() &&
51 "Result has incorrect number of elements");
53 auto ResultI = Result->front().begin();
54 for (
auto &KV : LookupSymbols) {
56 NewSymbols[KV.first] =
62 if (NewSymbols.
empty())
This class represents lattice values for constants.
A symbol table that supports asynchoronous symbol queries.
A set of symbols to look up, each associated with a SymbolLookupFlags value.
static Expected< std::unique_ptr< TPCDynamicLibrarySearchGenerator > > Load(TargetProcessControl &TPC, const char *LibraryPath, SymbolPredicate Allow=SymbolPredicate())
Permanently loads the library at the given path and, on success, returns a DynamicLibrarySearchGenera...
static ErrorSuccess success()
Create a success value.
A pair of a dylib and a set of symbols to be looked up.
LookupKind
Describes the kind of lookup being performed.
Represents a symbol that has been evaluated to an address already.
Error tryToGenerate(LookupState &LS, LookupKind K, JITDylib &JD, JITDylibLookupFlags JDLookupFlags, const SymbolLookupSet &Symbols) override
DefinitionGenerators should override this method to insert new definitions into the parent JITDylib.
SymbolLookupSet & add(SymbolStringPtr Name, SymbolLookupFlags Flags=SymbolLookupFlags::RequiredSymbol)
Add an element to the set.
virtual Expected< tpctypes::DylibHandle > loadDylib(const char *DylibPath)=0
Load the dynamic library at the given path and return a handle to it.
TargetProcessControl supports interaction with a JIT target process.
UnderlyingVector::size_type size() const
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
virtual Expected< std::vector< tpctypes::LookupResult > > lookupSymbols(ArrayRef< LookupRequest > Request)=0
Search for symbols in the target process.
Wraps state for a lookup-in-progress.
LLVM_NODISCARD bool empty() const
Lightweight error class with error context and mandatory checking.
std::unique_ptr< AbsoluteSymbolsMaterializationUnit > absoluteSymbols(SymbolMap Symbols)
Create an AbsoluteSymbolsMaterializationUnit with the given symbols.
Error define(std::unique_ptr< MaterializationUnitType > &&MU, ResourceTrackerSP RT=nullptr)
Define all symbols provided by the materialization unit to be part of this JITDylib.
JITDylibLookupFlags
Lookup flags that apply to each dylib in the search order for a lookup.