diff options
Diffstat (limited to 'examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h')
-rw-r--r-- | examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h b/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h index b856bb5e4f3..d14c2b1805f 100644 --- a/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h +++ b/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h @@ -66,8 +66,6 @@ class KaleidoscopeJIT { private: std::unique_ptr<TargetMachine> TM; const DataLayout DL; - std::unique_ptr<JITCompileCallbackManager> CompileCallbackMgr; - std::unique_ptr<IndirectStubsManager> IndirectStubsMgr; ObjectLinkingLayer<> ObjectLayer; IRCompileLayer<decltype(ObjectLayer)> CompileLayer; @@ -76,19 +74,22 @@ private: IRTransformLayer<decltype(CompileLayer), OptimizeFunction> OptimizeLayer; + std::unique_ptr<JITCompileCallbackManager> CompileCallbackMgr; + std::unique_ptr<IndirectStubsManager> IndirectStubsMgr; + public: typedef decltype(OptimizeLayer)::ModuleSetHandleT ModuleHandle; KaleidoscopeJIT() : TM(EngineBuilder().selectTarget()), DL(TM->createDataLayout()), - CompileCallbackMgr( - orc::createLocalCompileCallbackManager(TM->getTargetTriple(), 0)), CompileLayer(ObjectLayer, SimpleCompiler(*TM)), OptimizeLayer(CompileLayer, [this](std::unique_ptr<Module> M) { return optimizeModule(std::move(M)); - }) { + }), + CompileCallbackMgr( + orc::createLocalCompileCallbackManager(TM->getTargetTriple(), 0)) { auto IndirectStubsMgrBuilder = orc::createLocalIndirectStubsManagerBuilder(TM->getTargetTriple()); IndirectStubsMgr = IndirectStubsMgrBuilder(); |