Skip to content

Commit 21a0625

Browse files
committed
[ORC] Switch from JITTargetAddress to ExecutorAddr for EPC-call APIs.
Part of the ongoing move to ExecutorAddr.
1 parent 027c036 commit 21a0625

19 files changed

+76
-77
lines changed

llvm/include/llvm/ExecutionEngine/Orc/Core.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1482,8 +1482,7 @@ class ExecutionSession {
14821482
///
14831483
/// The given OnComplete function will be called to return the result.
14841484
void callWrapperAsync(ExecutorProcessControl::SendResultFunction OnComplete,
1485-
JITTargetAddress WrapperFnAddr,
1486-
ArrayRef<char> ArgBuffer) {
1485+
ExecutorAddr WrapperFnAddr, ArrayRef<char> ArgBuffer) {
14871486
EPC->callWrapperAsync(std::move(OnComplete), WrapperFnAddr, ArgBuffer);
14881487
}
14891488

@@ -1493,16 +1492,15 @@ class ExecutionSession {
14931492
/// \code{.cpp}
14941493
/// CWrapperFunctionResult fn(uint8_t *Data, uint64_t Size);
14951494
/// \endcode{.cpp}
1496-
shared::WrapperFunctionResult callWrapper(JITTargetAddress WrapperFnAddr,
1495+
shared::WrapperFunctionResult callWrapper(ExecutorAddr WrapperFnAddr,
14971496
ArrayRef<char> ArgBuffer) {
14981497
return EPC->callWrapper(WrapperFnAddr, ArgBuffer);
14991498
}
15001499

15011500
/// Run a wrapper function using SPS to serialize the arguments and
15021501
/// deserialize the results.
15031502
template <typename SPSSignature, typename SendResultT, typename... ArgTs>
1504-
void callSPSWrapperAsync(SendResultT &&SendResult,
1505-
JITTargetAddress WrapperFnAddr,
1503+
void callSPSWrapperAsync(SendResultT &&SendResult, ExecutorAddr WrapperFnAddr,
15061504
const ArgTs &...Args) {
15071505
EPC->callSPSWrapperAsync<SPSSignature, SendResultT, ArgTs...>(
15081506
std::forward<SendResultT>(SendResult), WrapperFnAddr, Args...);
@@ -1514,7 +1512,7 @@ class ExecutionSession {
15141512
/// If SPSSignature is a non-void function signature then the second argument
15151513
/// (the first in the Args list) should be a reference to a return value.
15161514
template <typename SPSSignature, typename... WrapperCallArgTs>
1517-
Error callSPSWrapper(JITTargetAddress WrapperFnAddr,
1515+
Error callSPSWrapper(ExecutorAddr WrapperFnAddr,
15181516
WrapperCallArgTs &&...WrapperCallArgs) {
15191517
return EPC->callSPSWrapper<SPSSignature, WrapperCallArgTs...>(
15201518
WrapperFnAddr, std::forward<WrapperCallArgTs>(WrapperCallArgs)...);

llvm/include/llvm/ExecutionEngine/Orc/EPCDebugObjectRegistrar.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ class DebugObjectRegistrar {
4040
/// executor process.
4141
class EPCDebugObjectRegistrar : public DebugObjectRegistrar {
4242
public:
43-
EPCDebugObjectRegistrar(ExecutionSession &ES, JITTargetAddress RegisterFn)
43+
EPCDebugObjectRegistrar(ExecutionSession &ES, ExecutorAddr RegisterFn)
4444
: ES(ES), RegisterFn(RegisterFn) {}
4545

4646
Error registerDebugObject(sys::MemoryBlock TargetMem) override;
4747

4848
private:
4949
ExecutionSession &ES;
50-
JITTargetAddress RegisterFn;
50+
ExecutorAddr RegisterFn;
5151
};
5252

5353
/// Create a ExecutorProcessControl-based DebugObjectRegistrar that emits debug

llvm/include/llvm/ExecutionEngine/Orc/EPCEHFrameRegistrar.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#define LLVM_EXECUTIONENGINE_ORC_EPCEHFRAMEREGISTRAR_H
1515

1616
#include "llvm/ExecutionEngine/JITLink/EHFrameSupport.h"
17+
#include "llvm/ExecutionEngine/Orc/Shared/ExecutorAddress.h"
1718

1819
namespace llvm {
1920
namespace orc {
@@ -33,8 +34,8 @@ class EPCEHFrameRegistrar : public jitlink::EHFrameRegistrar {
3334
/// Create a EPCEHFrameRegistrar with the given ExecutorProcessControl
3435
/// object and registration/deregistration function addresses.
3536
EPCEHFrameRegistrar(ExecutionSession &ES,
36-
JITTargetAddress RegisterEHFrameWrapperFnAddr,
37-
JITTargetAddress DeregisterEHFRameWrapperFnAddr)
37+
ExecutorAddr RegisterEHFrameWrapperFnAddr,
38+
ExecutorAddr DeregisterEHFRameWrapperFnAddr)
3839
: ES(ES), RegisterEHFrameWrapperFnAddr(RegisterEHFrameWrapperFnAddr),
3940
DeregisterEHFrameWrapperFnAddr(DeregisterEHFRameWrapperFnAddr) {}
4041

@@ -45,8 +46,8 @@ class EPCEHFrameRegistrar : public jitlink::EHFrameRegistrar {
4546

4647
private:
4748
ExecutionSession &ES;
48-
JITTargetAddress RegisterEHFrameWrapperFnAddr;
49-
JITTargetAddress DeregisterEHFrameWrapperFnAddr;
49+
ExecutorAddr RegisterEHFrameWrapperFnAddr;
50+
ExecutorAddr DeregisterEHFrameWrapperFnAddr;
5051
};
5152

5253
} // end namespace orc

llvm/include/llvm/ExecutionEngine/Orc/EPCGenericMemoryAccess.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,35 +43,35 @@ class EPCGenericMemoryAccess : public ExecutorProcessControl::MemoryAccess {
4343
WriteResultFn OnWriteComplete) override {
4444
using namespace shared;
4545
EPC.callSPSWrapperAsync<void(SPSSequence<SPSMemoryAccessUInt8Write>)>(
46-
std::move(OnWriteComplete), FAs.WriteUInt8s.getValue(), Ws);
46+
std::move(OnWriteComplete), FAs.WriteUInt8s, Ws);
4747
}
4848

4949
void writeUInt16sAsync(ArrayRef<tpctypes::UInt16Write> Ws,
5050
WriteResultFn OnWriteComplete) override {
5151
using namespace shared;
5252
EPC.callSPSWrapperAsync<void(SPSSequence<SPSMemoryAccessUInt16Write>)>(
53-
std::move(OnWriteComplete), FAs.WriteUInt16s.getValue(), Ws);
53+
std::move(OnWriteComplete), FAs.WriteUInt16s, Ws);
5454
}
5555

5656
void writeUInt32sAsync(ArrayRef<tpctypes::UInt32Write> Ws,
5757
WriteResultFn OnWriteComplete) override {
5858
using namespace shared;
5959
EPC.callSPSWrapperAsync<void(SPSSequence<SPSMemoryAccessUInt32Write>)>(
60-
std::move(OnWriteComplete), FAs.WriteUInt32s.getValue(), Ws);
60+
std::move(OnWriteComplete), FAs.WriteUInt32s, Ws);
6161
}
6262

6363
void writeUInt64sAsync(ArrayRef<tpctypes::UInt64Write> Ws,
6464
WriteResultFn OnWriteComplete) override {
6565
using namespace shared;
6666
EPC.callSPSWrapperAsync<void(SPSSequence<SPSMemoryAccessUInt64Write>)>(
67-
std::move(OnWriteComplete), FAs.WriteUInt64s.getValue(), Ws);
67+
std::move(OnWriteComplete), FAs.WriteUInt64s, Ws);
6868
}
6969

7070
void writeBuffersAsync(ArrayRef<tpctypes::BufferWrite> Ws,
7171
WriteResultFn OnWriteComplete) override {
7272
using namespace shared;
7373
EPC.callSPSWrapperAsync<void(SPSSequence<SPSMemoryAccessBufferWrite>)>(
74-
std::move(OnWriteComplete), FAs.WriteBuffers.getValue(), Ws);
74+
std::move(OnWriteComplete), FAs.WriteBuffers, Ws);
7575
}
7676

7777
private:

llvm/include/llvm/ExecutionEngine/Orc/ExecutorProcessControl.h

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ class ExecutorProcessControl {
196196
lookupSymbols(ArrayRef<LookupRequest> Request) = 0;
197197

198198
/// Run function with a main-like signature.
199-
virtual Expected<int32_t> runAsMain(JITTargetAddress MainFnAddr,
199+
virtual Expected<int32_t> runAsMain(ExecutorAddr MainFnAddr,
200200
ArrayRef<std::string> Args) = 0;
201201

202202
/// Run a wrapper function in the executor.
@@ -209,7 +209,7 @@ class ExecutorProcessControl {
209209
///
210210
/// The given OnComplete function will be called to return the result.
211211
virtual void callWrapperAsync(SendResultFunction OnComplete,
212-
JITTargetAddress WrapperFnAddr,
212+
ExecutorAddr WrapperFnAddr,
213213
ArrayRef<char> ArgBuffer) = 0;
214214

215215
/// Run a wrapper function in the executor. The wrapper function should be
@@ -218,7 +218,7 @@ class ExecutorProcessControl {
218218
/// \code{.cpp}
219219
/// CWrapperFunctionResult fn(uint8_t *Data, uint64_t Size);
220220
/// \endcode{.cpp}
221-
shared::WrapperFunctionResult callWrapper(JITTargetAddress WrapperFnAddr,
221+
shared::WrapperFunctionResult callWrapper(ExecutorAddr WrapperFnAddr,
222222
ArrayRef<char> ArgBuffer) {
223223
std::promise<shared::WrapperFunctionResult> RP;
224224
auto RF = RP.get_future();
@@ -231,8 +231,7 @@ class ExecutorProcessControl {
231231
/// Run a wrapper function using SPS to serialize the arguments and
232232
/// deserialize the results.
233233
template <typename SPSSignature, typename SendResultT, typename... ArgTs>
234-
void callSPSWrapperAsync(SendResultT &&SendResult,
235-
JITTargetAddress WrapperFnAddr,
234+
void callSPSWrapperAsync(SendResultT &&SendResult, ExecutorAddr WrapperFnAddr,
236235
const ArgTs &...Args) {
237236
shared::WrapperFunction<SPSSignature>::callAsync(
238237
[this,
@@ -250,7 +249,7 @@ class ExecutorProcessControl {
250249
/// If SPSSignature is a non-void function signature then the second argument
251250
/// (the first in the Args list) should be a reference to a return value.
252251
template <typename SPSSignature, typename... WrapperCallArgTs>
253-
Error callSPSWrapper(JITTargetAddress WrapperFnAddr,
252+
Error callSPSWrapper(ExecutorAddr WrapperFnAddr,
254253
WrapperCallArgTs &&...WrapperCallArgs) {
255254
return shared::WrapperFunction<SPSSignature>::call(
256255
[this, WrapperFnAddr](const char *ArgData, size_t ArgSize) {
@@ -301,13 +300,13 @@ class UnsupportedExecutorProcessControl : public ExecutorProcessControl {
301300
llvm_unreachable("Unsupported");
302301
}
303302

304-
Expected<int32_t> runAsMain(JITTargetAddress MainFnAddr,
303+
Expected<int32_t> runAsMain(ExecutorAddr MainFnAddr,
305304
ArrayRef<std::string> Args) override {
306305
llvm_unreachable("Unsupported");
307306
}
308307

309308
void callWrapperAsync(SendResultFunction OnComplete,
310-
JITTargetAddress WrapperFnAddr,
309+
ExecutorAddr WrapperFnAddr,
311310
ArrayRef<char> ArgBuffer) override {
312311
llvm_unreachable("Unsupported");
313312
}
@@ -338,11 +337,11 @@ class SelfExecutorProcessControl
338337
Expected<std::vector<tpctypes::LookupResult>>
339338
lookupSymbols(ArrayRef<LookupRequest> Request) override;
340339

341-
Expected<int32_t> runAsMain(JITTargetAddress MainFnAddr,
340+
Expected<int32_t> runAsMain(ExecutorAddr MainFnAddr,
342341
ArrayRef<std::string> Args) override;
343342

344343
void callWrapperAsync(SendResultFunction OnComplete,
345-
JITTargetAddress WrapperFnAddr,
344+
ExecutorAddr WrapperFnAddr,
346345
ArrayRef<char> ArgBuffer) override;
347346

348347
Error disconnect() override;

llvm/include/llvm/ExecutionEngine/Orc/OrcRPCExecutorProcessControl.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ class OrcRPCExecutorProcessControlBase : public ExecutorProcessControl {
337337
return EP.template callB<orcrpctpc::LookupSymbols>(RR);
338338
}
339339

340-
Expected<int32_t> runAsMain(JITTargetAddress MainFnAddr,
340+
Expected<int32_t> runAsMain(ExecutorAddr MainFnAddr,
341341
ArrayRef<std::string> Args) override {
342342
DEBUG_WITH_TYPE("orc", {
343343
dbgs() << "Running as main: " << formatv("{0:x16}", MainFnAddr)
@@ -358,7 +358,7 @@ class OrcRPCExecutorProcessControlBase : public ExecutorProcessControl {
358358
}
359359

360360
void callWrapperAsync(SendResultFunction OnComplete,
361-
JITTargetAddress WrapperFnAddr,
361+
ExecutorAddr WrapperFnAddr,
362362
ArrayRef<char> ArgBuffer) override {
363363
DEBUG_WITH_TYPE("orc", {
364364
dbgs() << "Running as wrapper function "
@@ -412,7 +412,7 @@ class OrcRPCExecutorProcessControlBase : public ExecutorProcessControl {
412412
private:
413413
Error runWrapperInJIT(
414414
std::function<Error(Expected<shared::WrapperFunctionResult>)> SendResult,
415-
JITTargetAddress FunctionTag, std::vector<uint8_t> ArgBuffer) {
415+
ExecutorAddr FunctionTag, std::vector<uint8_t> ArgBuffer) {
416416

417417
getExecutionSession().runJITDispatchHandler(
418418
[this, SendResult = std::move(SendResult)](

llvm/include/llvm/ExecutionEngine/Orc/SimpleRemoteEPC.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ class SimpleRemoteEPC : public ExecutorProcessControl,
5858
Expected<std::vector<tpctypes::LookupResult>>
5959
lookupSymbols(ArrayRef<LookupRequest> Request) override;
6060

61-
Expected<int32_t> runAsMain(JITTargetAddress MainFnAddr,
61+
Expected<int32_t> runAsMain(ExecutorAddr MainFnAddr,
6262
ArrayRef<std::string> Args) override;
6363

6464
void callWrapperAsync(SendResultFunction OnComplete,
65-
JITTargetAddress WrapperFnAddr,
65+
ExecutorAddr WrapperFnAddr,
6666
ArrayRef<char> ArgBuffer) override;
6767

6868
Error disconnect() override;

llvm/lib/ExecutionEngine/Orc/ELFNixPlatform.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -474,8 +474,7 @@ Error ELFNixPlatform::bootstrapELFNixRuntime(JITDylib &PlatformJD) {
474474
KV.second->setValue((*RuntimeSymbolAddrs)[Name].getAddress());
475475
}
476476

477-
if (auto Err = ES.callSPSWrapper<void()>(
478-
orc_rt_elfnix_platform_bootstrap.getValue()))
477+
if (auto Err = ES.callSPSWrapper<void()>(orc_rt_elfnix_platform_bootstrap))
479478
return Err;
480479

481480
// FIXME: Ordering is fuzzy here. We're probably best off saying
@@ -543,7 +542,7 @@ Error ELFNixPlatform::registerPerObjectSections(
543542
Error ErrResult = Error::success();
544543
if (auto Err = ES.callSPSWrapper<shared::SPSError(
545544
SPSELFPerObjectSectionsToRegister)>(
546-
orc_rt_elfnix_register_object_sections.getValue(), ErrResult, POSR))
545+
orc_rt_elfnix_register_object_sections, ErrResult, POSR))
547546
return Err;
548547
return ErrResult;
549548
}
@@ -557,7 +556,7 @@ Expected<uint64_t> ELFNixPlatform::createPThreadKey() {
557556

558557
Expected<uint64_t> Result(0);
559558
if (auto Err = ES.callSPSWrapper<SPSExpected<uint64_t>(void)>(
560-
orc_rt_elfnix_create_pthread_key.getValue(), Result))
559+
orc_rt_elfnix_create_pthread_key, Result))
561560
return std::move(Err);
562561
return Result;
563562
}

llvm/lib/ExecutionEngine/Orc/EPCDebugObjectRegistrar.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ createJITLoaderGDBRegistrar(ExecutionSession &ES) {
3939
assert((*Result)[0].size() == 1 &&
4040
"Unexpected number of addresses in result");
4141

42-
return std::make_unique<EPCDebugObjectRegistrar>(ES, (*Result)[0][0]);
42+
return std::make_unique<EPCDebugObjectRegistrar>(
43+
ES, ExecutorAddr((*Result)[0][0]));
4344
}
4445

4546
Error EPCDebugObjectRegistrar::registerDebugObject(sys::MemoryBlock TargetMem) {

llvm/lib/ExecutionEngine/Orc/EPCEHFrameRegistrar.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@ EPCEHFrameRegistrar::Create(ExecutionSession &ES) {
5151
auto RegisterEHFrameWrapperFnAddr = (*Result)[0][0];
5252
auto DeregisterEHFrameWrapperFnAddr = (*Result)[0][1];
5353

54-
return std::make_unique<EPCEHFrameRegistrar>(ES, RegisterEHFrameWrapperFnAddr,
55-
DeregisterEHFrameWrapperFnAddr);
54+
return std::make_unique<EPCEHFrameRegistrar>(
55+
ES, ExecutorAddr(RegisterEHFrameWrapperFnAddr),
56+
ExecutorAddr(DeregisterEHFrameWrapperFnAddr));
5657
}
5758

5859
Error EPCEHFrameRegistrar::registerEHFrames(JITTargetAddress EHFrameSectionAddr,

llvm/lib/ExecutionEngine/Orc/EPCGenericDylibManager.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Expected<tpctypes::DylibHandle> EPCGenericDylibManager::open(StringRef Path,
7676
Expected<tpctypes::DylibHandle> H(0);
7777
if (auto Err =
7878
EPC.callSPSWrapper<rt::SPSSimpleExecutorDylibManagerOpenSignature>(
79-
SAs.Open.getValue(), H, SAs.Instance, Path, Mode))
79+
SAs.Open, H, SAs.Instance, Path, Mode))
8080
return std::move(Err);
8181
return H;
8282
}
@@ -87,7 +87,7 @@ EPCGenericDylibManager::lookup(tpctypes::DylibHandle H,
8787
Expected<std::vector<ExecutorAddr>> Result((std::vector<ExecutorAddr>()));
8888
if (auto Err =
8989
EPC.callSPSWrapper<rt::SPSSimpleExecutorDylibManagerLookupSignature>(
90-
SAs.Lookup.getValue(), Result, SAs.Instance, H, Lookup))
90+
SAs.Lookup, Result, SAs.Instance, H, Lookup))
9191
return std::move(Err);
9292
return Result;
9393
}
@@ -98,7 +98,7 @@ EPCGenericDylibManager::lookup(tpctypes::DylibHandle H,
9898
Expected<std::vector<ExecutorAddr>> Result((std::vector<ExecutorAddr>()));
9999
if (auto Err =
100100
EPC.callSPSWrapper<rt::SPSSimpleExecutorDylibManagerLookupSignature>(
101-
SAs.Lookup.getValue(), Result, SAs.Instance, H, Lookup))
101+
SAs.Lookup, Result, SAs.Instance, H, Lookup))
102102
return std::move(Err);
103103
return Result;
104104
}

llvm/lib/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManager.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,14 @@ class EPCGenericJITLinkMemoryManager::Alloc
6767
else
6868
OnFinalize(std::move(FinalizeErr));
6969
},
70-
Parent.SAs.Finalize.getValue(), Parent.SAs.Allocator, std::move(FR));
70+
Parent.SAs.Finalize, Parent.SAs.Allocator, std::move(FR));
7171
}
7272

7373
Error deallocate() override {
7474
Error Err = Error::success();
7575
if (auto E2 = Parent.EPC.callSPSWrapper<
7676
rt::SPSSimpleExecutorMemoryManagerDeallocateSignature>(
77-
Parent.SAs.Deallocate.getValue(), Err, Parent.SAs.Allocator,
77+
Parent.SAs.Deallocate, Err, Parent.SAs.Allocator,
7878
ArrayRef<ExecutorAddr>(TargetAddr)))
7979
return E2;
8080
return Err;
@@ -114,7 +114,7 @@ EPCGenericJITLinkMemoryManager::allocate(const jitlink::JITLinkDylib *JD,
114114
Expected<ExecutorAddr> TargetAllocAddr((ExecutorAddr()));
115115
if (auto Err = EPC.callSPSWrapper<
116116
rt::SPSSimpleExecutorMemoryManagerReserveSignature>(
117-
SAs.Reserve.getValue(), TargetAllocAddr, SAs.Allocator, AllocSize))
117+
SAs.Reserve, TargetAllocAddr, SAs.Allocator, AllocSize))
118118
return std::move(Err);
119119
if (!TargetAllocAddr)
120120
return TargetAllocAddr.takeError();

llvm/lib/ExecutionEngine/Orc/EPCGenericRTDyldMemoryManager.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ EPCGenericRTDyldMemoryManager::~EPCGenericRTDyldMemoryManager() {
4949
Error Err = Error::success();
5050
if (auto Err2 = EPC.callSPSWrapper<
5151
rt::SPSSimpleExecutorMemoryManagerDeallocateSignature>(
52-
SAs.Reserve.getValue(), Err, SAs.Instance, FinalizedAllocs)) {
52+
SAs.Reserve, Err, SAs.Instance, FinalizedAllocs)) {
5353
// FIXME: Report errors through EPC once that functionality is available.
5454
logAllUnhandledErrors(std::move(Err2), errs(), "");
5555
return;
@@ -130,7 +130,7 @@ void EPCGenericRTDyldMemoryManager::reserveAllocationSpace(
130130
Expected<ExecutorAddr> TargetAllocAddr((ExecutorAddr()));
131131
if (auto Err = EPC.callSPSWrapper<
132132
rt::SPSSimpleExecutorMemoryManagerReserveSignature>(
133-
SAs.Reserve.getValue(), TargetAllocAddr, SAs.Instance, TotalSize)) {
133+
SAs.Reserve, TargetAllocAddr, SAs.Instance, TotalSize)) {
134134
std::lock_guard<std::mutex> Lock(M);
135135
ErrMsg = toString(std::move(Err));
136136
return;
@@ -270,8 +270,7 @@ bool EPCGenericRTDyldMemoryManager::finalizeMemory(std::string *ErrMsg) {
270270
Error FinalizeErr = Error::success();
271271
if (auto Err = EPC.callSPSWrapper<
272272
rt::SPSSimpleExecutorMemoryManagerFinalizeSignature>(
273-
SAs.Finalize.getValue(), FinalizeErr, SAs.Instance,
274-
std::move(FR))) {
273+
SAs.Finalize, FinalizeErr, SAs.Instance, std::move(FR))) {
275274
std::lock_guard<std::mutex> Lock(M);
276275
this->ErrMsg = toString(std::move(Err));
277276
dbgs() << "Serialization error: " << this->ErrMsg << "\n";

llvm/lib/ExecutionEngine/Orc/ExecutorProcessControl.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,18 +103,18 @@ SelfExecutorProcessControl::lookupSymbols(ArrayRef<LookupRequest> Request) {
103103
}
104104

105105
Expected<int32_t>
106-
SelfExecutorProcessControl::runAsMain(JITTargetAddress MainFnAddr,
106+
SelfExecutorProcessControl::runAsMain(ExecutorAddr MainFnAddr,
107107
ArrayRef<std::string> Args) {
108108
using MainTy = int (*)(int, char *[]);
109-
return orc::runAsMain(jitTargetAddressToFunction<MainTy>(MainFnAddr), Args);
109+
return orc::runAsMain(MainFnAddr.toPtr<MainTy>(), Args);
110110
}
111111

112-
void SelfExecutorProcessControl::callWrapperAsync(
113-
SendResultFunction SendResult, JITTargetAddress WrapperFnAddr,
114-
ArrayRef<char> ArgBuffer) {
112+
void SelfExecutorProcessControl::callWrapperAsync(SendResultFunction SendResult,
113+
ExecutorAddr WrapperFnAddr,
114+
ArrayRef<char> ArgBuffer) {
115115
using WrapperFnTy =
116116
shared::detail::CWrapperFunctionResult (*)(const char *Data, size_t Size);
117-
auto *WrapperFn = jitTargetAddressToFunction<WrapperFnTy>(WrapperFnAddr);
117+
auto *WrapperFn = WrapperFnAddr.toPtr<WrapperFnTy>();
118118
SendResult(WrapperFn(ArgBuffer.data(), ArgBuffer.size()));
119119
}
120120

0 commit comments

Comments
 (0)