aboutsummaryrefslogtreecommitdiff
path: root/tools/driver/PathRunner.h
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-22 03:41:04 +0000
committer_ov4 <ov4@ov4.org>2026-10-22 03:58:36 +0000
commiteba981b4f515010f8f6e9602c563d2074d8bd915 (patch)
tree632e5b72446e5fdfa8b575e19fd6d01ea25598de /tools/driver/PathRunner.h
parent6f11b59dff6ddc84c20fc1847a42344bfdddf066 (diff)
refactor(driver): move PATH-mode lli runner into PathRunner
PathRunner.cc holds the lli lookup, LLVM 23 version check and lli execution, and is built only with CPSC_RUN_MODE=PATH like EmbeddedRunner.cc is for EMBEDDED. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tools/driver/PathRunner.h')
-rw-r--r--tools/driver/PathRunner.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/driver/PathRunner.h b/tools/driver/PathRunner.h
new file mode 100644
index 0000000..2043d4f
--- /dev/null
+++ b/tools/driver/PathRunner.h
@@ -0,0 +1,13 @@
+#pragma once
+
+#include <string>
+#include <vector>
+
+// Finds PATH's lli for -r and checks that it is from LLVM 23. Reports a fatal
+// error and returns false otherwise.
+bool findLli(std::string &LliPath);
+
+// Executes the IR at IRPath with lli and returns the program's status.
+// Objects named by INCLUDE_OBJ are passed to lli as extra objects.
+int runLli(const std::string &LliPath, const std::string &IRPath,
+ const std::vector<std::string> &Objects);