diff options
| author | David Blaikie <dblaikie@gmail.com> | 2015-02-19 19:06:04 +0000 |
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2015-02-19 19:06:04 +0000 |
| commit | 8d2d6b1d05ec5ec91921551eb4dd62af9f974b14 (patch) | |
| tree | 9cdc7d2b2a47037bcf2e80983508c77106630c71 /llvm/examples | |
| parent | d74002965e7aac9d4549f1f420c3a9827db3d397 (diff) | |
| download | bcm5719-llvm-8d2d6b1d05ec5ec91921551eb4dd62af9f974b14.tar.gz bcm5719-llvm-8d2d6b1d05ec5ec91921551eb4dd62af9f974b14.zip | |
[orcjit] Include CMake support for the fully_lazy example and fix the build
Not sure if/how to make the CMake build use C++14 for the examples, so
let's stick to C++11 for now.
llvm-svn: 229888
Diffstat (limited to 'llvm/examples')
| -rw-r--r-- | llvm/examples/Kaleidoscope/Orc/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | llvm/examples/Kaleidoscope/Orc/fully_lazy/CMakeLists.txt | 3 | ||||
| -rw-r--r-- | llvm/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp | 10 |
3 files changed, 8 insertions, 6 deletions
diff --git a/llvm/examples/Kaleidoscope/Orc/CMakeLists.txt b/llvm/examples/Kaleidoscope/Orc/CMakeLists.txt index e4cf0c2aa1b..5aa04543dc6 100644 --- a/llvm/examples/Kaleidoscope/Orc/CMakeLists.txt +++ b/llvm/examples/Kaleidoscope/Orc/CMakeLists.txt @@ -1,3 +1,4 @@ add_subdirectory(initial) add_subdirectory(lazy_codegen) add_subdirectory(lazy_irgen) +add_subdirectory(fully_lazy) diff --git a/llvm/examples/Kaleidoscope/Orc/fully_lazy/CMakeLists.txt b/llvm/examples/Kaleidoscope/Orc/fully_lazy/CMakeLists.txt index 44886818e0f..abb0428a152 100644 --- a/llvm/examples/Kaleidoscope/Orc/fully_lazy/CMakeLists.txt +++ b/llvm/examples/Kaleidoscope/Orc/fully_lazy/CMakeLists.txt @@ -2,11 +2,12 @@ set(LLVM_LINK_COMPONENTS Core ExecutionEngine Object + OrcJIT RuntimeDyld Support native ) -add_kaleidoscope_chapter(Kaleidoscope-Orc-lazy_irgen +add_kaleidoscope_chapter(Kaleidoscope-Orc-fully_lazy toy.cpp ) diff --git a/llvm/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp b/llvm/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp index f29a6f52f18..b1aca7803da 100644 --- a/llvm/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp +++ b/llvm/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp @@ -1280,11 +1280,11 @@ private: // // The update action will update FunctionBodyPointer to point at the newly // compiled function. - CallbackInfo.setCompileAction( - [this, Fn = std::shared_ptr<FunctionAST>(std::move(FnAST))](){ - auto H = addModule(IRGen(Session, *Fn)); - return findSymbolIn(H, Fn->Proto->Name).getAddress(); - }); + std::shared_ptr<FunctionAST> Fn = std::move(FnAST); + CallbackInfo.setCompileAction([this, Fn]() { + auto H = addModule(IRGen(Session, *Fn)); + return findSymbolIn(H, Fn->Proto->Name).getAddress(); + }); CallbackInfo.setUpdateAction( CompileCallbacks.getLocalFPUpdater(H, Mangle(BodyPtrName))); |

