mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
[Kaleidoscope][Orc] Fix the fully_lazy Orc Kaleidoscope example.
r251933 changed the Orc compile callbacks API, which broke this. llvm-svn: 251942
This commit is contained in:
parent
be20c3f9e9
commit
a08608417e
@ -1168,9 +1168,7 @@ public:
|
|||||||
: Session(Session),
|
: Session(Session),
|
||||||
CompileLayer(ObjectLayer, SimpleCompiler(Session.getTarget())),
|
CompileLayer(ObjectLayer, SimpleCompiler(Session.getTarget())),
|
||||||
LazyEmitLayer(CompileLayer),
|
LazyEmitLayer(CompileLayer),
|
||||||
CompileCallbacks(LazyEmitLayer, CCMgrMemMgr, Session.getLLVMContext(),
|
CompileCallbacks(reinterpret_cast<uintptr_t>(EarthShatteringKaboom)) {}
|
||||||
reinterpret_cast<uintptr_t>(EarthShatteringKaboom),
|
|
||||||
64) {}
|
|
||||||
|
|
||||||
std::string mangle(const std::string &Name) {
|
std::string mangle(const std::string &Name) {
|
||||||
std::string MangledName;
|
std::string MangledName;
|
||||||
@ -1260,8 +1258,7 @@ private:
|
|||||||
// the function. The resulting CallbackInfo type will let us set the
|
// the function. The resulting CallbackInfo type will let us set the
|
||||||
// compile and update actions for the callback, and get a pointer to
|
// compile and update actions for the callback, and get a pointer to
|
||||||
// the jit trampoline that we need to call to trigger those actions.
|
// the jit trampoline that we need to call to trigger those actions.
|
||||||
auto CallbackInfo =
|
auto CallbackInfo = CompileCallbacks.getCompileCallback();
|
||||||
CompileCallbacks.getCompileCallback(F->getContext());
|
|
||||||
|
|
||||||
// Step 3) Create a stub that will indirectly call the body of this
|
// Step 3) Create a stub that will indirectly call the body of this
|
||||||
// function once it is compiled. Initially, set the function
|
// function once it is compiled. Initially, set the function
|
||||||
@ -1311,7 +1308,7 @@ private:
|
|||||||
|
|
||||||
std::map<std::string, std::unique_ptr<FunctionAST>> FunctionDefs;
|
std::map<std::string, std::unique_ptr<FunctionAST>> FunctionDefs;
|
||||||
|
|
||||||
JITCompileCallbackManager<LazyEmitLayerT, OrcX86_64> CompileCallbacks;
|
JITCompileCallbackManager<OrcX86_64> CompileCallbacks;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void HandleDefinition(SessionContext &S, KaleidoscopeJIT &J) {
|
static void HandleDefinition(SessionContext &S, KaleidoscopeJIT &J) {
|
||||||
|
Loading…
Reference in New Issue
Block a user