aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-jitlink/llvm-jitlink.cpp
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2023-07-23 17:56:49 -0700
committerLang Hames <lhames@gmail.com>2023-07-24 09:14:01 -0700
commit331a54d670722f5ee6b64a25d1547df3679d6c51 (patch)
treeb87acae7f19a60ebf3792e8848bf4677652caf11 /llvm/tools/llvm-jitlink/llvm-jitlink.cpp
parent7c36b416b6b1f8ff9a689ad4c33ef921259d04d5 (diff)
downloadllvm-331a54d670722f5ee6b64a25d1547df3679d6c51.zip
llvm-331a54d670722f5ee6b64a25d1547df3679d6c51.tar.gz
llvm-331a54d670722f5ee6b64a25d1547df3679d6c51.tar.bz2
[llvm-jitlink] Don't return immediately in -noexec mode, just skip execution.
Skipping execution rather than bailing out early means that: 1. Explicit teardown of JIT'd code will happen at the same point (via the call to ExecutionSession::endSession) regardless of whether -noexec is used. 2. The -show-times option will work with -noexec.
Diffstat (limited to 'llvm/tools/llvm-jitlink/llvm-jitlink.cpp')
-rw-r--r--llvm/tools/llvm-jitlink/llvm-jitlink.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/tools/llvm-jitlink/llvm-jitlink.cpp b/llvm/tools/llvm-jitlink/llvm-jitlink.cpp
index 3b8def4..00dd520 100644
--- a/llvm/tools/llvm-jitlink/llvm-jitlink.cpp
+++ b/llvm/tools/llvm-jitlink/llvm-jitlink.cpp
@@ -2038,11 +2038,8 @@ int main(int argc, char *argv[]) {
ExitOnErr(runChecks(*S));
- if (NoExec)
- return 0;
-
int Result = 0;
- {
+ if (!NoExec) {
LLVM_DEBUG(dbgs() << "Running \"" << EntryPointName << "\"...\n");
TimeRegion TR(Timers ? &Timers->RunTimer : nullptr);
if (!OrcRuntime.empty())