diff options
Diffstat (limited to 'llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h')
| -rw-r--r-- | llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h index 7ef1d07d879..68bdafe9897 100644 --- a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h +++ b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h @@ -42,7 +42,6 @@ class KaleidoscopeJIT { private: std::unique_ptr<TargetMachine> TM; const DataLayout DL; - std::unique_ptr<JITCompileCallbackManager> CompileCallbackManager; ObjectLinkingLayer<> ObjectLayer; IRCompileLayer<decltype(ObjectLayer)> CompileLayer; @@ -50,6 +49,8 @@ private: OptimizeFunction; IRTransformLayer<decltype(CompileLayer), OptimizeFunction> OptimizeLayer; + + std::unique_ptr<JITCompileCallbackManager> CompileCallbackManager; CompileOnDemandLayer<decltype(OptimizeLayer)> CODLayer; public: @@ -57,13 +58,13 @@ public: KaleidoscopeJIT() : TM(EngineBuilder().selectTarget()), DL(TM->createDataLayout()), - CompileCallbackManager( - orc::createLocalCompileCallbackManager(TM->getTargetTriple(), 0)), CompileLayer(ObjectLayer, SimpleCompiler(*TM)), OptimizeLayer(CompileLayer, [this](std::unique_ptr<Module> M) { return optimizeModule(std::move(M)); }), + CompileCallbackManager( + orc::createLocalCompileCallbackManager(TM->getTargetTriple(), 0)), CODLayer(OptimizeLayer, [this](Function &F) { return std::set<Function*>({&F}); }, *CompileCallbackManager, |

