[llvm] r229888 - [orcjit] Include CMake support for the fully_lazy example and fix the build
David Blaikie
dblaikie at gmail.com
Thu Feb 19 11:06:04 PST 2015
Author: dblaikie
Date: Thu Feb 19 13:06:04 2015
New Revision: 229888
URL: http://llvm.org/viewvc/llvm-project?rev=229888&view=rev
Log:
[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.
Modified:
llvm/trunk/examples/Kaleidoscope/Orc/CMakeLists.txt
llvm/trunk/examples/Kaleidoscope/Orc/fully_lazy/CMakeLists.txt
llvm/trunk/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp
Modified: llvm/trunk/examples/Kaleidoscope/Orc/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Orc/CMakeLists.txt?rev=229888&r1=229887&r2=229888&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Orc/CMakeLists.txt (original)
+++ llvm/trunk/examples/Kaleidoscope/Orc/CMakeLists.txt Thu Feb 19 13:06:04 2015
@@ -1,3 +1,4 @@
add_subdirectory(initial)
add_subdirectory(lazy_codegen)
add_subdirectory(lazy_irgen)
+add_subdirectory(fully_lazy)
Modified: llvm/trunk/examples/Kaleidoscope/Orc/fully_lazy/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Orc/fully_lazy/CMakeLists.txt?rev=229888&r1=229887&r2=229888&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Orc/fully_lazy/CMakeLists.txt (original)
+++ llvm/trunk/examples/Kaleidoscope/Orc/fully_lazy/CMakeLists.txt Thu Feb 19 13:06:04 2015
@@ -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
)
Modified: llvm/trunk/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp?rev=229888&r1=229887&r2=229888&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp (original)
+++ llvm/trunk/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp Thu Feb 19 13:06:04 2015
@@ -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)));
More information about the llvm-commits
mailing list