OSDN Git Service

[JITLink] Update BuildingAJIT tutorials to account for API changes in r358818.
authorLang Hames <lhames@gmail.com>
Sat, 20 Apr 2019 17:35:28 +0000 (17:35 +0000)
committerLang Hames <lhames@gmail.com>
Sat, 20 Apr 2019 17:35:28 +0000 (17:35 +0000)
DynamicLibrarySearchGenerator::GetForCurrentProcess now takes a char (the global
prefix) rather than a DataLayout reference.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358820 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 25535bf..643f65a 100644 (file)
@@ -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() {
index 783ef73..1b04cfb 100644 (file)
@@ -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; }