From: Lang Hames Date: Tue, 3 Nov 2015 16:35:10 +0000 (+0000) Subject: [Kaleidoscope][Orc] Fix the fully_lazy Orc Kaleidoscope example. X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=166aa4459f303c426f0eeccad2a066fefccf4314;hp=94652aba1f177e8080b87fb997fa2da4602b45a0;ds=sidebyside [Kaleidoscope][Orc] Fix the fully_lazy Orc Kaleidoscope example. r251933 changed the Orc compile callbacks API, which broke this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251942 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp b/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp index fe4ac5d0c28..877a7262e91 100644 --- a/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp +++ b/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp @@ -1168,9 +1168,7 @@ public: : Session(Session), CompileLayer(ObjectLayer, SimpleCompiler(Session.getTarget())), LazyEmitLayer(CompileLayer), - CompileCallbacks(LazyEmitLayer, CCMgrMemMgr, Session.getLLVMContext(), - reinterpret_cast(EarthShatteringKaboom), - 64) {} + CompileCallbacks(reinterpret_cast(EarthShatteringKaboom)) {} std::string mangle(const std::string &Name) { std::string MangledName; @@ -1260,8 +1258,7 @@ private: // the function. The resulting CallbackInfo type will let us set the // compile and update actions for the callback, and get a pointer to // the jit trampoline that we need to call to trigger those actions. - auto CallbackInfo = - CompileCallbacks.getCompileCallback(F->getContext()); + auto CallbackInfo = CompileCallbacks.getCompileCallback(); // Step 3) Create a stub that will indirectly call the body of this // function once it is compiled. Initially, set the function @@ -1311,7 +1308,7 @@ private: std::map> FunctionDefs; - JITCompileCallbackManager CompileCallbacks; + JITCompileCallbackManager CompileCallbacks; }; static void HandleDefinition(SessionContext &S, KaleidoscopeJIT &J) {