diff options
Diffstat (limited to 'llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4')
-rw-r--r-- | llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h index f3878918065..6378dd61e29 100644 --- a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h +++ b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h @@ -81,7 +81,7 @@ private: IRCompileLayer<decltype(ObjectLayer), SimpleCompiler> CompileLayer; using OptimizeFunction = - std::function<std::shared_ptr<Module>(std::shared_ptr<Module>)>; + std::function<std::unique_ptr<Module>(std::unique_ptr<Module>)>; IRTransformLayer<decltype(CompileLayer), OptimizeFunction> OptimizeLayer; @@ -113,7 +113,7 @@ public: }), CompileLayer(ObjectLayer, SimpleCompiler(*TM)), OptimizeLayer(CompileLayer, - [this](std::shared_ptr<Module> M) { + [this](std::unique_ptr<Module> M) { return optimizeModule(std::move(M)); }), CompileCallbackMgr( @@ -207,7 +207,7 @@ private: return MangledNameStream.str(); } - std::shared_ptr<Module> optimizeModule(std::shared_ptr<Module> M) { + std::unique_ptr<Module> optimizeModule(std::unique_ptr<Module> M) { // Create a function pass manager. auto FPM = llvm::make_unique<legacy::FunctionPassManager>(M.get()); |