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 | 966d9ebd7f825b6272aa691dcef6baada1129c5c (patch) | |
tree | 1930140eb962cde4c4dfe954956338f35e822282 /examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h | |
parent | 285f30181c40356d268c9bd7875c585d5fd6ff65 (diff) |
[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).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307058 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h')
-rw-r--r-- | examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h b/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h index d45874e9a69..c0d1b69ed59 100644 --- a/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h +++ b/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h @@ -90,6 +90,7 @@ public: KaleidoscopeJIT() : TM(EngineBuilder().selectTarget()), DL(TM->createDataLayout()), + ObjectLayer([]() { return std::make_shared<SectionMemoryManager>(); }), CompileLayer(ObjectLayer, SimpleCompiler(*TM)), OptimizeLayer(CompileLayer, [this](std::shared_ptr<Module> M) { @@ -128,7 +129,6 @@ public: // Add the set to the JIT with the resolver we created above and a newly // created SectionMemoryManager. return OptimizeLayer.addModule(std::move(M), - make_unique<SectionMemoryManager>(), std::move(Resolver)); } |