llvm.org GIT mirror llvm / 166aa44
[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 Lang Hames 3 years ago
1 changed file(s) with 3 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
11671167 : Session(Session),
11681168 CompileLayer(ObjectLayer, SimpleCompiler(Session.getTarget())),
11691169 LazyEmitLayer(CompileLayer),
1170 CompileCallbacks(LazyEmitLayer, CCMgrMemMgr, Session.getLLVMContext(),
1171 reinterpret_cast(EarthShatteringKaboom),
1172 64) {}
1170 CompileCallbacks(reinterpret_cast(EarthShatteringKaboom)) {}
11731171
11741172 std::string mangle(const std::string &Name) {
11751173 std::string MangledName;
12591257 // the function. The resulting CallbackInfo type will let us set the
12601258 // compile and update actions for the callback, and get a pointer to
12611259 // the jit trampoline that we need to call to trigger those actions.
1262 auto CallbackInfo =
1263 CompileCallbacks.getCompileCallback(F->getContext());
1260 auto CallbackInfo = CompileCallbacks.getCompileCallback();
12641261
12651262 // Step 3) Create a stub that will indirectly call the body of this
12661263 // function once it is compiled. Initially, set the function
13101307
13111308 std::map> FunctionDefs;
13121309
1313 JITCompileCallbackManager<LazyEmitLayerT, OrcX86_64> CompileCallbacks;
1310 JITCompileCallbackManager<OrcX86_64> CompileCallbacks;
13141311 };
13151312
13161313 static void HandleDefinition(SessionContext &S, KaleidoscopeJIT &J) {