diff --git a/llvm/examples/Kaleidoscope/include/KaleidoscopeJIT.h b/llvm/examples/Kaleidoscope/include/KaleidoscopeJIT.h --- a/llvm/examples/Kaleidoscope/include/KaleidoscopeJIT.h +++ b/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> Create() { - auto EPC = SelfExecutorProcessControl::Create(); + std::shared_ptr SSP = std::make_unique(); + auto EPC = SelfExecutorProcessControl::Create(SSP); if (!EPC) return EPC.takeError(); - - auto ES = std::make_unique(std::move(*EPC)); - + auto ES = std::make_unique(SSP); JITTargetMachineBuilder JTMB( - ES->getExecutorProcessControl().getTargetTriple()); + EPC.get()->getTargetTriple()); auto DL = JTMB.getDefaultDataLayoutForTarget(); if (!DL)