Fix KS tutorial build failure.
[oota-llvm.git] / examples / Kaleidoscope / Chapter8 / toy.cpp
index 814ca61ccd67092e16de71181a36ca5a961c721e..eaa07ee93f4a926c66f663f049a496c8691b0a3c 100644 (file)
@@ -1444,10 +1444,11 @@ int main() {
 
   // Create the JIT.  This takes ownership of the module.
   std::string ErrStr;
-  TheExecutionEngine = EngineBuilder(std::move(Owner))
-                           .setErrorStr(&ErrStr)
-                           .setMCJITMemoryManager(new SectionMemoryManager())
-                           .create();
+  TheExecutionEngine =
+      EngineBuilder(std::move(Owner))
+          .setErrorStr(&ErrStr)
+          .setMCJITMemoryManager(llvm::make_unique<SectionMemoryManager>())
+          .create();
   if (!TheExecutionEngine) {
     fprintf(stderr, "Could not create ExecutionEngine: %s\n", ErrStr.c_str());
     exit(1);