From eba981b4f515010f8f6e9602c563d2074d8bd915 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Thu, 22 Oct 2026 03:41:04 +0000 Subject: 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 --- tools/driver/PathRunner.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tools/driver/PathRunner.h (limited to 'tools/driver/PathRunner.h') 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 +#include + +// 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 &Objects); -- cgit v1.3.1-4-g156e