summaryrefslogtreecommitdiffstats
path: root/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2018-02-14 22:13:02 +0000
committerLang Hames <lhames@gmail.com>2018-02-14 22:13:02 +0000
commit1cd3dd0bd8ba00a9a613f651fe74868276301f03 (patch)
treed56a717bf2daebc2c9a58132ab7709d29839e0b5 /llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4
parente833fe8ec31e1bc51d59c84af158ac44ed423153 (diff)
downloadbcm5719-llvm-1cd3dd0bd8ba00a9a613f651fe74868276301f03.tar.gz
bcm5719-llvm-1cd3dd0bd8ba00a9a613f651fe74868276301f03.zip
[ORC] Consolidate RTDyldObjectLinkingLayer GetMemMgr and GetResolver into a
unified GetResources callback. Having a single 'GetResources' callback will simplify adding new resources in the future. llvm-svn: 325180
Diffstat (limited to 'llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4')
-rw-r--r--llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h
index 1fa169b8b13..f3878918065 100644
--- a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h
+++ b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h
@@ -89,7 +89,6 @@ private:
std::unique_ptr<IndirectStubsManager> IndirectStubsMgr;
public:
-
KaleidoscopeJIT()
: ES(SSP),
Resolver(createLegacyLookupResolver(
@@ -107,10 +106,11 @@ public:
},
[](Error Err) { cantFail(std::move(Err), "lookupFlags failed"); })),
TM(EngineBuilder().selectTarget()), DL(TM->createDataLayout()),
- ObjectLayer(
- ES,
- [](VModuleKey) { return std::make_shared<SectionMemoryManager>(); },
- [&](VModuleKey K) { return Resolver; }),
+ ObjectLayer(ES,
+ [this](VModuleKey K) {
+ return RTDyldObjectLinkingLayer::Resources{
+ std::make_shared<SectionMemoryManager>(), Resolver};
+ }),
CompileLayer(ObjectLayer, SimpleCompiler(*TM)),
OptimizeLayer(CompileLayer,
[this](std::shared_ptr<Module> M) {
OpenPOWER on IntegriCloud