[PATCH] D115117: Update KaleidoscopeJIT.h
abdullah abdalkafi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 5 08:27:21 PST 2021
hero2002 created this revision.
hero2002 added a project: LLVM.
hero2002 requested review of this revision.
Herald added a subscriber: llvm-commits.
Updated KaleidoscopeJIT.h to work with latest version of LLVM API
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D115117
Files:
llvm/examples/Kaleidoscope/include/KaleidoscopeJIT.h
Index: llvm/examples/Kaleidoscope/include/KaleidoscopeJIT.h
===================================================================
--- llvm/examples/Kaleidoscope/include/KaleidoscopeJIT.h
+++ llvm/examples/Kaleidoscope/include/KaleidoscopeJIT.h
@@ -22,6 +22,7 @@
#include "llvm/ExecutionEngine/Orc/IRCompileLayer.h"
#include "llvm/ExecutionEngine/Orc/JITTargetMachineBuilder.h"
#include "llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h"
+#include "llvm/ExecutionEngine/Orc/EPCIndirectionUtils.h"
#include "llvm/ExecutionEngine/SectionMemoryManager.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/LLVMContext.h"
@@ -54,10 +55,6 @@
MainJD.addGenerator(
cantFail(DynamicLibrarySearchGenerator::GetForCurrentProcess(
DL.getGlobalPrefix())));
- if (JTMB.getTargetTriple().isOSBinFormatCOFF()) {
- ObjectLayer.setOverrideObjectFlagsWithResponsibilityFlags(true);
- ObjectLayer.setAutoClaimResponsibilityForObjectSymbols(true);
- }
}
~KaleidoscopeJIT() {
@@ -66,14 +63,13 @@
}
static Expected<std::unique_ptr<KaleidoscopeJIT>> Create() {
- auto EPC = SelfExecutorProcessControl::Create();
+ std::shared_ptr<SymbolStringPool> SSP = std::make_unique<SymbolStringPool>();
+ auto EPC = SelfExecutorProcessControl::Create(SSP);
if (!EPC)
return EPC.takeError();
-
- auto ES = std::make_unique<ExecutionSession>(std::move(*EPC));
-
+ auto ES = std::make_unique<ExecutionSession>(SSP);
JITTargetMachineBuilder JTMB(
- ES->getExecutorProcessControl().getTargetTriple());
+ EPC.get()->getTargetTriple());
auto DL = JTMB.getDefaultDataLayoutForTarget();
if (!DL)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115117.391917.patch
Type: text/x-patch
Size: 1675 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211205/fab3c469/attachment.bin>
More information about the llvm-commits
mailing list