Skip to content

Commit 36f1e68

Browse files
committed
[Next][JIT] Fix JIT API in Immediate
Fixing some of the JITing API differences between `next` and `stable/20221013`.
1 parent 91e029b commit 36f1e68

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

lib/Immediate/Immediate.cpp

+7-6
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ class SwiftJIT {
334334

335335
(*EPCIU)->createLazyCallThroughManager(
336336
(*J)->getExecutionSession(),
337-
llvm::pointerToJITTargetAddress(&handleLazyCompilationFailure));
337+
llvm::orc::ExecutorAddr::fromPtr(&handleLazyCompilationFailure));
338338

339339
if (auto Err = setUpInProcessLCTMReentryViaEPCIU(**EPCIU))
340340
return std::move(Err);
@@ -404,11 +404,13 @@ class SwiftJIT {
404404
return llvm::Error::success();
405405
}
406406

407-
llvm::Error notifyRemovingResources(llvm::orc::ResourceKey K) override {
407+
llvm::Error notifyRemovingResources(llvm::orc::JITDylib &JD,
408+
llvm::orc::ResourceKey K) override {
408409
return llvm::Error::success();
409410
}
410411

411-
void notifyTransferringResources(llvm::orc::ResourceKey DstKey,
412+
void notifyTransferringResources(llvm::orc::JITDylib &JD,
413+
llvm::orc::ResourceKey DstKey,
412414
llvm::orc::ResourceKey SrcKey) override {}
413415

414416
private:
@@ -440,9 +442,8 @@ class SwiftJIT {
440442
continue;
441443

442444
if (ToRename.count(Sym->getName())) {
443-
// FIXME: Get rid of the temporary when Swift's llvm-project is
444-
// updated to LLVM 17.
445-
auto NewName = G.allocateString(mangleFunctionBody(Sym->getName()));
445+
auto NewName =
446+
G.allocateCString(Twine(mangleFunctionBody(Sym->getName())));
446447
Sym->setName({NewName.data(), NewName.size()});
447448
}
448449
}

0 commit comments

Comments
 (0)