[llvm] 0bae937 - s/setGenerator/addGenerator/ in the JIT docs. NFC

Jon Roelofs via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 15 15:54:43 PDT 2021


Author: Jon Roelofs
Date: 2021-04-15T15:54:28-07:00
New Revision: 0bae93771d5589f69b79c3e3f6d71d69b8dd6667

URL: https://github.com/llvm/llvm-project/commit/0bae93771d5589f69b79c3e3f6d71d69b8dd6667
DIFF: https://github.com/llvm/llvm-project/commit/0bae93771d5589f69b79c3e3f6d71d69b8dd6667.diff

LOG: s/setGenerator/addGenerator/ in the JIT docs. NFC

Added: 
    

Modified: 
    llvm/docs/ORCv2.rst
    llvm/docs/tutorial/BuildingAJIT1.rst
    llvm/docs/tutorial/BuildingAJIT2.rst

Removed: 
    


################################################################################
diff  --git a/llvm/docs/ORCv2.rst b/llvm/docs/ORCv2.rst
index 4c3974bec144f..c5bc189af8f80 100644
--- a/llvm/docs/ORCv2.rst
+++ b/llvm/docs/ORCv2.rst
@@ -730,7 +730,7 @@ For example, to load the whole interface of a runtime library:
     const DataLayout &DL = getDataLayout();
     auto &JD = ES.createJITDylib("main");
 
-    JD.setGenerator(DynamicLibrarySearchGenerator::Load("/path/to/lib"
+    JD.addGenerator(DynamicLibrarySearchGenerator::Load("/path/to/lib"
                                                         DL.getGlobalPrefix()));
 
     // IR added to JD can now link against all symbols exported by the library
@@ -753,7 +753,7 @@ Or, to expose an allowed set of symbols from the main process:
 
     // Use GetForCurrentProcess with a predicate function that checks the
     // allowed list.
-    JD.setGenerator(
+    JD.addGenerator(
       DynamicLibrarySearchGenerator::GetForCurrentProcess(
         DL.getGlobalPrefix(),
         [&](const SymbolStringPtr &S) { return AllowList.count(S); }));

diff  --git a/llvm/docs/tutorial/BuildingAJIT1.rst b/llvm/docs/tutorial/BuildingAJIT1.rst
index 33d36896cbfc1..e51acb48d8dba 100644
--- a/llvm/docs/tutorial/BuildingAJIT1.rst
+++ b/llvm/docs/tutorial/BuildingAJIT1.rst
@@ -142,8 +142,8 @@ usual include guards and #includes [2]_, we get to the definition of our class:
           CompileLayer(ES, ObjectLayer, ConcurrentIRCompiler(std::move(JTMB))),
           DL(std::move(DL)), Mangle(ES, this->DL),
           Ctx(std::make_unique<LLVMContext>()) {
-      ES.getMainJITDylib().setGenerator(
-          cantFail(DynamicLibrarySearchGenerator::GetForCurrentProcess(DL)));
+      ES.getMainJITDylib().addGenerator(
+          cantFail(DynamicLibrarySearchGenerator::GetForCurrentProcess(DL.getGlobalPrefix())));
     }
 
 Our class begins with six member variables: An ExecutionSession member, ``ES``,

diff  --git a/llvm/docs/tutorial/BuildingAJIT2.rst b/llvm/docs/tutorial/BuildingAJIT2.rst
index 574cdf1f59913..ee4e6916ecbc6 100644
--- a/llvm/docs/tutorial/BuildingAJIT2.rst
+++ b/llvm/docs/tutorial/BuildingAJIT2.rst
@@ -76,8 +76,8 @@ apply to each Module that is added via addModule:
           TransformLayer(ES, CompileLayer, optimizeModule),
           DL(std::move(DL)), Mangle(ES, this->DL),
           Ctx(std::make_unique<LLVMContext>()) {
-      ES.getMainJITDylib().setGenerator(
-          cantFail(DynamicLibrarySearchGenerator::GetForCurrentProcess(DL)));
+      ES.getMainJITDylib().addGenerator(
+          cantFail(DynamicLibrarySearchGenerator::GetForCurrentProcess(DL.getGlobalPrefix())));
     }
 
 Our extended KaleidoscopeJIT class starts out the same as it did in Chapter 1,


        


More information about the llvm-commits mailing list