diff options
Diffstat (limited to 'examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h')
-rw-r--r-- | examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h b/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h index 3274433178b..f99722f60e9 100644 --- a/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h +++ b/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h @@ -44,7 +44,7 @@ private: IRCompileLayer<decltype(ObjectLayer), SimpleCompiler> CompileLayer; public: - using ModuleHandle = decltype(CompileLayer)::ModuleSetHandleT; + using ModuleHandle = decltype(CompileLayer)::ModuleHandleT; KaleidoscopeJIT() : TM(EngineBuilder().selectTarget()), DL(TM->createDataLayout()), @@ -72,15 +72,11 @@ public: return JITSymbol(nullptr); }); - // Build a singleton module set to hold our module. - std::vector<std::unique_ptr<Module>> Ms; - Ms.push_back(std::move(M)); - // Add the set to the JIT with the resolver we created above and a newly // created SectionMemoryManager. - return CompileLayer.addModuleSet(std::move(Ms), - make_unique<SectionMemoryManager>(), - std::move(Resolver)); + return CompileLayer.addModule(std::move(M), + make_unique<SectionMemoryManager>(), + std::move(Resolver)); } JITSymbol findSymbol(const std::string Name) { @@ -91,7 +87,7 @@ public: } void removeModule(ModuleHandle H) { - CompileLayer.removeModuleSet(H); + CompileLayer.removeModule(H); } }; |