diff options
| author | Lang Hames <lhames@gmail.com> | 2017-07-04 04:42:30 +0000 |
|---|---|---|
| committer | Lang Hames <lhames@gmail.com> | 2017-07-04 04:42:30 +0000 |
| commit | 5b51816020a0daf35f8c24ca06ddffb24d1d493e (patch) | |
| tree | e31025566467d993f049a6ed82299fc64fe83401 /llvm/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h | |
| parent | b224d985940212e4f8986a5f505d7c7bff563fb4 (diff) | |
| download | bcm5719-llvm-5b51816020a0daf35f8c24ca06ddffb24d1d493e.tar.gz bcm5719-llvm-5b51816020a0daf35f8c24ca06ddffb24d1d493e.zip | |
[Orc] Remove the memory manager argument to addModule, and de-templatize the
symbol resolver argument.
De-templatizing the symbol resolver is part of the ongoing simplification of
ORC layer API.
Removing the memory management argument (and delegating construction of memory
managers for RTDyldObjectLinkingLayer to a functor passed in to the constructor)
allows us to build JITs whose base object layers need not be compatible with
RTDyldObjectLinkingLayer's memory mangement scheme. For example, a 'remote
object layer' that sends fully relocatable objects directly to the remote does
not need a memory management scheme at all (that will be handled by the remote).
llvm-svn: 307058
Diffstat (limited to 'llvm/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h')
| -rw-r--r-- | llvm/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h index f99722f60e9..5ce8c9f152a 100644 --- a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h +++ b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h @@ -48,6 +48,7 @@ public: KaleidoscopeJIT() : TM(EngineBuilder().selectTarget()), DL(TM->createDataLayout()), + ObjectLayer([]() { return std::make_shared<SectionMemoryManager>(); }), CompileLayer(ObjectLayer, SimpleCompiler(*TM)) { llvm::sys::DynamicLibrary::LoadLibraryPermanently(nullptr); } @@ -75,7 +76,6 @@ public: // Add the set to the JIT with the resolver we created above and a newly // created SectionMemoryManager. return CompileLayer.addModule(std::move(M), - make_unique<SectionMemoryManager>(), std::move(Resolver)); } |

