Skip to content

Commit 25b7883

Browse files
committed
Update with changes from upstream
1 parent 99f14e4 commit 25b7883

File tree

3 files changed

+9
-14
lines changed

3 files changed

+9
-14
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: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ __orc_rt_jit_dlopen_wrapper(const char *ArgData, size_t ArgSize) {
4242
.release();
4343
}
4444

45-
#ifndef _WIN32
4645
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(
@@ -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_CWrapperFunctionResult
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
@@ -625,14 +625,11 @@ Error ORCPlatformSupport::initialize(orc::JITDylib &JD) {
625625
[](const JITDylibSearchOrder &SO) { return SO; });
626626
StringRef WrapperToCall = "__orc_rt_jit_dlopen_wrapper";
627627
bool dlupdate = false;
628-
const Triple &TT = ES.getTargetTriple();
629-
if (TT.isOSBinFormatMachO() || TT.isOSBinFormatELF()) {
630-
if (InitializedDylib.contains(&JD)) {
631-
WrapperToCall = "__orc_rt_jit_dlupdate_wrapper";
632-
dlupdate = true;
633-
} else
634-
InitializedDylib.insert(&JD);
635-
}
628+
if (InitializedDylib.contains(&JD)) {
629+
WrapperToCall = "__orc_rt_jit_dlupdate_wrapper";
630+
dlupdate = true;
631+
} else
632+
InitializedDylib.insert(&JD);
636633

637634
if (auto WrapperAddr =
638635
ES.lookup(MainSearchOrder, J.mangleAndIntern(WrapperToCall))) {

0 commit comments

Comments
 (0)