Skip to content

Commit 89a6822

Browse files
committed
Update with changes from upstream
1 parent 480db01 commit 89a6822

File tree

3 files changed

+10
-15
lines changed

3 files changed

+10
-15
lines changed

compiler-rt/lib/orc/coff_platform.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ Error COFFPlatformRuntimeState::dlopenInitialize(
410410
}
411411

412412
Error COFFPlatformRuntimeState::dlupdateImpl(void *DSOHandle) {
413-
// Try to find JITDylib state by name.
413+
// Try to find JITDylib state by header.
414414
auto *JDS = getJITDylibStateByHeader(DSOHandle);
415415

416416
if (!JDS) {
@@ -432,9 +432,9 @@ Error COFFPlatformRuntimeState::dlupdateFull(JITDylibState &JDS) {
432432
// Call back to the JIT to push the initializers.
433433
Expected<COFFJITDylibDepInfoMap> DepInfoMap((COFFJITDylibDepInfoMap()));
434434
if (auto Err = WrapperFunction<SPSExpected<SPSCOFFJITDylibDepInfoMap>(
435-
SPSExecutorAddr)>::call(&__orc_rt_coff_push_initializers_tag,
436-
DepInfoMap,
437-
ExecutorAddr::fromPtr(JDS.Header)))
435+
SPSExecutorAddr)>::
436+
call(JITDispatch(&__orc_rt_coff_push_initializers_tag), DepInfoMap,
437+
ExecutorAddr::fromPtr(JDS.Header)))
438438
return Err;
439439
if (!DepInfoMap)
440440
return DepInfoMap.takeError();

compiler-rt/lib/orc/dlfcn_wrapper.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ __orc_rt_jit_dlopen_wrapper(const char *ArgData, size_t ArgSize) {
4242
.release();
4343
}
4444

45-
#ifndef _WIN32
46-
ORC_RT_INTERFACE orc_rt_WrapperFunctionResult
45+
ORC_RT_INTERFACE orc_rt_CWrapperFunctionResult
4746
__orc_rt_jit_dlupdate_wrapper(const char *ArgData, size_t ArgSize) {
4847
return WrapperFunction<int32_t(SPSExecutorAddr)>::handle(
4948
ArgData, ArgSize,
@@ -52,7 +51,6 @@ __orc_rt_jit_dlupdate_wrapper(const char *ArgData, size_t ArgSize) {
5251
})
5352
.release();
5453
}
55-
#endif
5654

5755
ORC_RT_INTERFACE orc_rt_WrapperFunctionResult
5856
__orc_rt_jit_dlclose_wrapper(const char *ArgData, size_t ArgSize) {

llvm/lib/ExecutionEngine/Orc/LLJIT.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -617,14 +617,11 @@ Error ORCPlatformSupport::initialize(orc::JITDylib &JD) {
617617
[](const JITDylibSearchOrder &SO) { return SO; });
618618
StringRef WrapperToCall = "__orc_rt_jit_dlopen_wrapper";
619619
bool dlupdate = false;
620-
const Triple &TT = ES.getTargetTriple();
621-
if (TT.isOSBinFormatMachO() || TT.isOSBinFormatELF()) {
622-
if (InitializedDylib.contains(&JD)) {
623-
WrapperToCall = "__orc_rt_jit_dlupdate_wrapper";
624-
dlupdate = true;
625-
} else
626-
InitializedDylib.insert(&JD);
627-
}
620+
if (InitializedDylib.contains(&JD)) {
621+
WrapperToCall = "__orc_rt_jit_dlupdate_wrapper";
622+
dlupdate = true;
623+
} else
624+
InitializedDylib.insert(&JD);
628625

629626
if (auto WrapperAddr =
630627
ES.lookup(MainSearchOrder, J.mangleAndIntern(WrapperToCall))) {

0 commit comments

Comments
 (0)