summaryrefslogtreecommitdiffstats
path: root/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h')
-rw-r--r--llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h
index 46638c1f720..acb4090b5eb 100644
--- a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h
+++ b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h
@@ -86,7 +86,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;
@@ -121,7 +121,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));
}),
Remote(Remote) {
@@ -223,7 +223,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());
OpenPOWER on IntegriCloud