[ORC] Return ExecutorAddrs rather than JITEvaluatedSymbols from LLJIT::lookup.
Clients don't care about linkage, and ExecutorAddr is much more ergonomic.
This commit is contained in:
1 parent
b226894d47
commit
16dcbb53dc
17 files changed
+48
-49
No files matched your search
+2
-2
@@ -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"
|
||||
|
||||
Reference in new issue
Block a user