[examples] Fix Kaleidoscope examples after OrcJIT break-up / remote TPC commit.
authorLang Hames <lhames@gmail.com>
Fri, 13 Nov 2020 07:40:40 +0000 (18:40 +1100)
committerLang Hames <lhames@gmail.com>
Fri, 13 Nov 2020 07:43:13 +0000 (18:43 +1100)
Fix the Kaleidoscope examples after 1d0676b54c4 by explicitly creating the
SymbolStringPool.

llvm/examples/Kaleidoscope/include/KaleidoscopeJIT.h

index 9b35456..eb2d21c 100644 (file)
@@ -65,11 +65,12 @@ public:
   }
 
   static Expected<std::unique_ptr<KaleidoscopeJIT>> Create() {
-    auto TPC = SelfTargetProcessControl::Create();
+    auto SSP = std::make_shared<SymbolStringPool>();
+    auto TPC = SelfTargetProcessControl::Create(SSP);
     if (!TPC)
       return TPC.takeError();
 
-    auto ES = std::make_unique<ExecutionSession>();
+    auto ES = std::make_unique<ExecutionSession>(std::move(SSP));
 
     JITTargetMachineBuilder JTMB((*TPC)->getTargetTriple());