[llvm] r358820 - [JITLink] Update BuildingAJIT tutorials to account for API changes in r358818.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 20 10:35:28 PDT 2019


Author: lhames
Date: Sat Apr 20 10:35:28 2019
New Revision: 358820

URL: http://llvm.org/viewvc/llvm-project?rev=358820&view=rev
Log:
[JITLink] Update BuildingAJIT tutorials to account for API changes in r358818.

DynamicLibrarySearchGenerator::GetForCurrentProcess now takes a char (the global
prefix) rather than a DataLayout reference.

Modified:
    llvm/trunk/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h
    llvm/trunk/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h

Modified: llvm/trunk/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h?rev=358820&r1=358819&r2=358820&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h (original)
+++ llvm/trunk/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h Sat Apr 20 10:35:28 2019
@@ -47,7 +47,8 @@ public:
         DL(std::move(DL)), Mangle(ES, this->DL),
         Ctx(llvm::make_unique<LLVMContext>()) {
     ES.getMainJITDylib().setGenerator(
-        cantFail(DynamicLibrarySearchGenerator::GetForCurrentProcess(DL)));
+        cantFail(DynamicLibrarySearchGenerator::GetForCurrentProcess(
+            DL.getGlobalPrefix())));
   }
 
   static Expected<std::unique_ptr<KaleidoscopeJIT>> Create() {

Modified: llvm/trunk/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h?rev=358820&r1=358819&r2=358820&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h (original)
+++ llvm/trunk/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h Sat Apr 20 10:35:28 2019
@@ -54,7 +54,8 @@ public:
         DL(std::move(DL)), Mangle(ES, this->DL),
         Ctx(llvm::make_unique<LLVMContext>()) {
     ES.getMainJITDylib().setGenerator(
-        cantFail(DynamicLibrarySearchGenerator::GetForCurrentProcess(DL)));
+        cantFail(DynamicLibrarySearchGenerator::GetForCurrentProcess(
+            DL.getGlobalPrefix())));
   }
 
   const DataLayout &getDataLayout() const { return DL; }




More information about the llvm-commits mailing list