diff options
Diffstat (limited to 'contrib/llvm-project/llvm/lib/ExecutionEngine/Orc/LazyReexports.cpp')
| -rw-r--r-- | contrib/llvm-project/llvm/lib/ExecutionEngine/Orc/LazyReexports.cpp | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/contrib/llvm-project/llvm/lib/ExecutionEngine/Orc/LazyReexports.cpp b/contrib/llvm-project/llvm/lib/ExecutionEngine/Orc/LazyReexports.cpp index c0a740d42dbd..d95a642934f1 100644 --- a/contrib/llvm-project/llvm/lib/ExecutionEngine/Orc/LazyReexports.cpp +++ b/contrib/llvm-project/llvm/lib/ExecutionEngine/Orc/LazyReexports.cpp @@ -8,19 +8,20 @@ #include "llvm/ExecutionEngine/Orc/LazyReexports.h" -#include "llvm/ADT/Triple.h" #include "llvm/ExecutionEngine/Orc/OrcABISupport.h" +#include "llvm/TargetParser/Triple.h" #define DEBUG_TYPE "orc" namespace llvm { namespace orc { -LazyCallThroughManager::LazyCallThroughManager( - ExecutionSession &ES, JITTargetAddress ErrorHandlerAddr, TrampolinePool *TP) +LazyCallThroughManager::LazyCallThroughManager(ExecutionSession &ES, + ExecutorAddr ErrorHandlerAddr, + TrampolinePool *TP) : ES(ES), ErrorHandlerAddr(ErrorHandlerAddr), TP(TP) {} -Expected<JITTargetAddress> LazyCallThroughManager::getCallThroughTrampoline( +Expected<ExecutorAddr> LazyCallThroughManager::getCallThroughTrampoline( JITDylib &SourceJD, SymbolStringPtr SymbolName, NotifyResolvedFunction NotifyResolved) { assert(TP && "TrampolinePool not set"); @@ -36,24 +37,24 @@ Expected<JITTargetAddress> LazyCallThroughManager::getCallThroughTrampoline( return *Trampoline; } -JITTargetAddress LazyCallThroughManager::reportCallThroughError(Error Err) { +ExecutorAddr LazyCallThroughManager::reportCallThroughError(Error Err) { ES.reportError(std::move(Err)); return ErrorHandlerAddr; } Expected<LazyCallThroughManager::ReexportsEntry> -LazyCallThroughManager::findReexport(JITTargetAddress TrampolineAddr) { +LazyCallThroughManager::findReexport(ExecutorAddr TrampolineAddr) { std::lock_guard<std::mutex> Lock(LCTMMutex); auto I = Reexports.find(TrampolineAddr); if (I == Reexports.end()) return createStringError(inconvertibleErrorCode(), - "Missing reexport for trampoline address %p", - TrampolineAddr); + "Missing reexport for trampoline address %p" + + formatv("{0:x}", TrampolineAddr)); return I->second; } -Error LazyCallThroughManager::notifyResolved(JITTargetAddress TrampolineAddr, - JITTargetAddress ResolvedAddr) { +Error LazyCallThroughManager::notifyResolved(ExecutorAddr TrampolineAddr, + ExecutorAddr ResolvedAddr) { NotifyResolvedFunction NotifyResolved; { std::lock_guard<std::mutex> Lock(LCTMMutex); @@ -68,7 +69,7 @@ Error LazyCallThroughManager::notifyResolved(JITTargetAddress TrampolineAddr, } void LazyCallThroughManager::resolveTrampolineLandingAddress( - JITTargetAddress TrampolineAddr, + ExecutorAddr TrampolineAddr, NotifyLandingResolvedFunction NotifyLandingResolved) { auto Entry = findReexport(TrampolineAddr); @@ -84,7 +85,7 @@ void LazyCallThroughManager::resolveTrampolineLandingAddress( if (Result) { assert(Result->size() == 1 && "Unexpected result size"); assert(Result->count(SymbolName) && "Unexpected result value"); - JITTargetAddress LandingAddr = (*Result)[SymbolName].getAddress(); + ExecutorAddr LandingAddr = (*Result)[SymbolName].getAddress(); if (auto Err = notifyResolved(TrampolineAddr, LandingAddr)) NotifyLandingResolved(reportCallThroughError(std::move(Err))); @@ -104,7 +105,7 @@ void LazyCallThroughManager::resolveTrampolineLandingAddress( Expected<std::unique_ptr<LazyCallThroughManager>> createLocalLazyCallThroughManager(const Triple &T, ExecutionSession &ES, - JITTargetAddress ErrorHandlerAddr) { + ExecutorAddr ErrorHandlerAddr) { switch (T.getArch()) { default: return make_error<StringError>( @@ -187,7 +188,7 @@ void LazyReexportsMaterializationUnit::materialize( auto CallThroughTrampoline = LCTManager.getCallThroughTrampoline( SourceJD, Alias.second.Aliasee, [&ISManager = this->ISManager, - StubSym = Alias.first](JITTargetAddress ResolvedAddr) -> Error { + StubSym = Alias.first](ExecutorAddr ResolvedAddr) -> Error { return ISManager.updatePointer(*StubSym, ResolvedAddr); }); |
