[PATCH] D115117: Update KaleidoscopeJIT.h

abdullah abdalkafi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 5 12:03:32 PST 2021


hero2002 updated this revision to Diff 391930.
hero2002 added a comment.

fixed problems with formatting


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115117/new/

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());
+    JITTargetMachineBuilder JTMB(EPC.get()->getTargetTriple());
 
     auto DL = JTMB.getDefaultDataLayoutForTarget();
     if (!DL)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115117.391930.patch
Type: text/x-patch
Size: 1709 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211205/764a77a7/attachment.bin>


More information about the llvm-commits mailing list