From 5b51816020a0daf35f8c24ca06ddffb24d1d493e Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Tue, 4 Jul 2017 04:42:30 +0000 Subject: [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 --- llvm/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/examples/Kaleidoscope/BuildingAJIT/Chapter1') 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(); }), 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(), std::move(Resolver)); } -- cgit v1.2.3