Skip to content

Commit

Permalink
[lli] Don't create an ExecutorProcessControl in non-remote MCJIT config.
Browse files Browse the repository at this point in the history
When lli is run with -jit-kind=mcjit and without remote JITing there is no need
to create an ExecutorProcessControl object.

This is nice cleanup, but as a bonus should silence the leak reports that we're
seeing in https://green.lab.llvm.org/green/job/clang-stage2-cmake-RgSan/9105/.
(Though as a side note I believe those reports are spurious. They are being
tracked by rdar://104825696).
  • Loading branch information
lhames committed Feb 1, 2023
1 parent a7fbca4 commit 930d477
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions llvm/tools/lli/lli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -663,10 +663,6 @@ int main(int argc, char **argv, char * const *envp) {
#endif
}

std::unique_ptr<orc::ExecutorProcessControl> EPC =
RemoteMCJIT ? ExitOnErr(launchRemote())
: ExitOnErr(orc::SelfExecutorProcessControl::Create());

if (!RemoteMCJIT) {
// If the program doesn't explicitly call exit, we will need the Exit
// function later on to make an explicit call, so get the function now.
Expand Down Expand Up @@ -712,6 +708,7 @@ int main(int argc, char **argv, char * const *envp) {
abort();
} else {
// else == "if (RemoteMCJIT)"
std::unique_ptr<orc::ExecutorProcessControl> EPC = ExitOnErr(launchRemote());

// Remote target MCJIT doesn't (yet) support static constructors. No reason
// it couldn't. This is a limitation of the LLI implementation, not the
Expand Down

0 comments on commit 930d477

Please sign in to comment.