[ORC] Update examples to incorporate changes in ce2207abaf9.
authorLang Hames <lhames@gmail.com>
Wed, 22 Jan 2020 04:35:40 +0000 (20:35 -0800)
committerLang Hames <lhames@gmail.com>
Wed, 22 Jan 2020 04:37:14 +0000 (20:37 -0800)
This should fix the builders that were failing due to broken JIT examples
after ce2207abaf9.

llvm/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h
llvm/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h
llvm/examples/SpeculativeJIT/SpeculativeJIT.cpp

index 020b72c..b7404ba 100644 (file)
@@ -45,7 +45,8 @@ public:
   KaleidoscopeJIT(JITTargetMachineBuilder JTMB, DataLayout DL)
       : ObjectLayer(ES,
                     []() { return std::make_unique<SectionMemoryManager>(); }),
-        CompileLayer(ES, ObjectLayer, ConcurrentIRCompiler(std::move(JTMB))),
+        CompileLayer(ES, ObjectLayer,
+                     std::make_unique<ConcurrentIRCompiler>(std::move(JTMB))),
         DL(std::move(DL)), Mangle(ES, this->DL),
         Ctx(std::make_unique<LLVMContext>()),
         MainJD(ES.createJITDylib("<main>")) {
index c8f01c0..efb1934 100644 (file)
@@ -51,7 +51,8 @@ public:
   KaleidoscopeJIT(JITTargetMachineBuilder JTMB, DataLayout DL)
       : ObjectLayer(ES,
                     []() { return std::make_unique<SectionMemoryManager>(); }),
-        CompileLayer(ES, ObjectLayer, ConcurrentIRCompiler(std::move(JTMB))),
+        CompileLayer(ES, ObjectLayer,
+                     std::make_unique<ConcurrentIRCompiler>(std::move(JTMB))),
         OptimizeLayer(ES, CompileLayer, optimizeModule), DL(std::move(DL)),
         Mangle(ES, this->DL), Ctx(std::make_unique<LLVMContext>()),
         MainJD(ES.createJITDylib("<main>")) {
index f4cfb74..3828e0a 100644 (file)
@@ -104,7 +104,7 @@ private:
       : ES(std::move(ES)), DL(std::move(DL)),
         MainJD(this->ES->createJITDylib("<main>")), LCTMgr(std::move(LCTMgr)),
         CompileLayer(*this->ES, ObjLayer,
-                     ConcurrentIRCompiler(std::move(JTMB))),
+                     std::make_unique<ConcurrentIRCompiler>(std::move(JTMB))),
         S(Imps, *this->ES),
         SpeculateLayer(*this->ES, CompileLayer, S, Mangle, BlockFreqQuery()),
         CODLayer(*this->ES, SpeculateLayer, *this->LCTMgr,