diff options
| author | Lang Hames <lhames@gmail.com> | 2022-05-05 13:24:39 -0700 |
|---|---|---|
| committer | Lang Hames <lhames@gmail.com> | 2022-05-05 13:56:00 -0700 |
| commit | 16dcbb53dc7968a3752661aac731172ebe0faf64 (patch) | |
| tree | 671e58c42bdf2baf053ce02e64067c8a9e3c77c3 /llvm/examples/OrcV2Examples/LLJITWithExecutorProcessControl/LLJITWithExecutorProcessControl.cpp | |
| parent | b226894d475b4758ed1da0c23e664b027c89634b (diff) | |
[ORC] Return ExecutorAddrs rather than JITEvaluatedSymbols from LLJIT::lookup.
Clients don't care about linkage, and ExecutorAddr is much more ergonomic.
Diffstat (limited to 'llvm/examples/OrcV2Examples/LLJITWithExecutorProcessControl/LLJITWithExecutorProcessControl.cpp')
| -rw-r--r-- | llvm/examples/OrcV2Examples/LLJITWithExecutorProcessControl/LLJITWithExecutorProcessControl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/examples/OrcV2Examples/LLJITWithExecutorProcessControl/LLJITWithExecutorProcessControl.cpp b/llvm/examples/OrcV2Examples/LLJITWithExecutorProcessControl/LLJITWithExecutorProcessControl.cpp index 45f4f481e656..634d74d9b80e 100644 --- a/llvm/examples/OrcV2Examples/LLJITWithExecutorProcessControl/LLJITWithExecutorProcessControl.cpp +++ b/llvm/examples/OrcV2Examples/LLJITWithExecutorProcessControl/LLJITWithExecutorProcessControl.cpp @@ -187,8 +187,8 @@ int main(int argc, char *argv[]) { // arguments passed. // Look up the JIT'd function, cast it to a function pointer, then call it. - auto EntrySym = ExitOnErr(J->lookup("entry")); - auto *Entry = (int (*)(int))EntrySym.getAddress(); + auto EntryAddr = ExitOnErr(J->lookup("entry")); + auto *Entry = EntryAddr.toPtr<int(int)>(); int Result = Entry(argc); outs() << "---Result---\n" |
