[ORC] Fix BuildingAJIT tutorial code broken by r368707.
authorLang Hames <lhames@gmail.com>
Tue, 13 Aug 2019 19:38:52 +0000 (19:38 +0000)
committerLang Hames <lhames@gmail.com>
Tue, 13 Aug 2019 19:38:52 +0000 (19:38 +0000)
llvm-svn: 368740

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

index 643f65a..8b79f2e 100644 (file)
@@ -46,7 +46,7 @@ public:
         CompileLayer(ES, ObjectLayer, ConcurrentIRCompiler(std::move(JTMB))),
         DL(std::move(DL)), Mangle(ES, this->DL),
         Ctx(llvm::make_unique<LLVMContext>()) {
-    ES.getMainJITDylib().setGenerator(
+    ES.getMainJITDylib().addGenerator(
         cantFail(DynamicLibrarySearchGenerator::GetForCurrentProcess(
             DL.getGlobalPrefix())));
   }
index eadd5c0..bf89d3b 100644 (file)
@@ -53,7 +53,7 @@ public:
         OptimizeLayer(ES, CompileLayer, optimizeModule),
         DL(std::move(DL)), Mangle(ES, this->DL),
         Ctx(llvm::make_unique<LLVMContext>()) {
-    ES.getMainJITDylib().setGenerator(
+    ES.getMainJITDylib().addGenerator(
         cantFail(DynamicLibrarySearchGenerator::GetForCurrentProcess(
             DL.getGlobalPrefix())));
   }