From: Lang Hames Date: Tue, 13 Aug 2019 19:38:52 +0000 (+0000) Subject: [ORC] Fix BuildingAJIT tutorial code broken by r368707. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=06d793d23340f6a7116c51913ef5cb3ab4ac12af;p=llvm [ORC] Fix BuildingAJIT tutorial code broken by r368707. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368740 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h b/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h index 643f65ad3b6..8b79f2eefd9 100644 --- a/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h +++ b/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h @@ -46,7 +46,7 @@ public: CompileLayer(ES, ObjectLayer, ConcurrentIRCompiler(std::move(JTMB))), DL(std::move(DL)), Mangle(ES, this->DL), Ctx(llvm::make_unique()) { - ES.getMainJITDylib().setGenerator( + ES.getMainJITDylib().addGenerator( cantFail(DynamicLibrarySearchGenerator::GetForCurrentProcess( DL.getGlobalPrefix()))); } diff --git a/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h b/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h index eadd5c0b599..bf89d3b7597 100644 --- a/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h +++ b/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h @@ -53,7 +53,7 @@ public: OptimizeLayer(ES, CompileLayer, optimizeModule), DL(std::move(DL)), Mangle(ES, this->DL), Ctx(llvm::make_unique()) { - ES.getMainJITDylib().setGenerator( + ES.getMainJITDylib().addGenerator( cantFail(DynamicLibrarySearchGenerator::GetForCurrentProcess( DL.getGlobalPrefix()))); }