[llvm] r229888 - [orcjit] Include CMake support for the fully_lazy example and fix the build

Lang Hames lhames at gmail.com
Thu Feb 19 17:32:28 PST 2015


Thanks Dave!

On Thu, Feb 19, 2015 at 11:06 AM, David Blaikie <dblaikie at gmail.com> wrote:

> 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)));
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150219/cb6e3c61/attachment.html>


More information about the llvm-commits mailing list