diff options
Diffstat (limited to 'llvm/examples/Kaleidoscope/Chapter8/toy.cpp')
-rw-r--r-- | llvm/examples/Kaleidoscope/Chapter8/toy.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/examples/Kaleidoscope/Chapter8/toy.cpp b/llvm/examples/Kaleidoscope/Chapter8/toy.cpp index 814ca61ccd6..eaa07ee93f4 100644 --- a/llvm/examples/Kaleidoscope/Chapter8/toy.cpp +++ b/llvm/examples/Kaleidoscope/Chapter8/toy.cpp @@ -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); |