]> granicus.if.org Git - llvm/commitdiff
[ORC] Fix SpeculativeJIT example code broken by r368707.
authorLang Hames <lhames@gmail.com>
Tue, 13 Aug 2019 22:44:54 +0000 (22:44 +0000)
committerLang Hames <lhames@gmail.com>
Tue, 13 Aug 2019 22:44:54 +0000 (22:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368764 91177308-0d34-0410-b5e6-96231b3b80d8

examples/SpeculativeJIT/SpeculativeJIT.cpp

index 147144a32e97ba4c97690e986d9198a733d9dc44..219018001dec7d1c2a5a7199e3a9d7502a9d5424 100644 (file)
@@ -95,11 +95,12 @@ private:
     exit(1);
   }
 
-  SpeculativeJIT(std::unique_ptr<ExecutionSession> ES, DataLayout DL,
-                 orc::JITTargetMachineBuilder JTMB,
-                 std::unique_ptr<LazyCallThroughManager> LCTMgr,
-                 IndirectStubsManagerBuilderFunction ISMBuilder,
-                 DynamicLibrarySearchGenerator ProcessSymbolsGenerator)
+  SpeculativeJIT(
+      std::unique_ptr<ExecutionSession> ES, DataLayout DL,
+      orc::JITTargetMachineBuilder JTMB,
+      std::unique_ptr<LazyCallThroughManager> LCTMgr,
+      IndirectStubsManagerBuilderFunction ISMBuilder,
+      std::unique_ptr<DynamicLibrarySearchGenerator> ProcessSymbolsGenerator)
       : ES(std::move(ES)), DL(std::move(DL)), LCTMgr(std::move(LCTMgr)),
         CompileLayer(*this->ES, ObjLayer,
                      ConcurrentIRCompiler(std::move(JTMB))),
@@ -107,7 +108,7 @@ private:
         SpeculateLayer(*this->ES, CompileLayer, S, BlockFreqQuery()),
         CODLayer(*this->ES, SpeculateLayer, *this->LCTMgr,
                  std::move(ISMBuilder)) {
-    this->ES->getMainJITDylib().setGenerator(
+    this->ES->getMainJITDylib().addGenerator(
         std::move(ProcessSymbolsGenerator));
     this->CODLayer.setImplMap(&Imps);
     this->ES->setDispatchMaterialization(