summaryrefslogtreecommitdiffstats
path: root/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2017-07-04 04:42:30 +0000
committerLang Hames <lhames@gmail.com>2017-07-04 04:42:30 +0000
commit5b51816020a0daf35f8c24ca06ddffb24d1d493e (patch)
treee31025566467d993f049a6ed82299fc64fe83401 /llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4
parentb224d985940212e4f8986a5f505d7c7bff563fb4 (diff)
downloadbcm5719-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/Chapter4')
-rw-r--r--llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h
index d45874e9a69..c0d1b69ed59 100644
--- a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h
+++ b/llvm/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));
}
OpenPOWER on IntegriCloud