From b1d059fa52df0277c1125011541d973df76f1acf Mon Sep 17 00:00:00 2001 From: jeaye Date: Tue, 30 Sep 2025 10:59:40 -0700 Subject: [PATCH] Fix `run_clang_repl` output when not present On the happy path, when `clang-repl` is present, we will invoke it in order to determine if the host supports JIT features. That will return a string containing "true". However, in cases where `clang-repl` is not present or we fail to invoke it, we previously returned `False`, which would then trigger a failure with our substring check. This PR updates the function to return `""` instead, so the substring check is still valid. This is related to https://github.com/llvm/llvm-project/pull/157359, where the original change was introduced. --- clang/test/lit.cfg.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clang/test/lit.cfg.py b/clang/test/lit.cfg.py index 64e2bbad8f3b2..e6c79d7a71b51 100644 --- a/clang/test/lit.cfg.py +++ b/clang/test/lit.cfg.py @@ -145,7 +145,7 @@ def run_clang_repl(args): clang_repl_exe = lit.util.which("clang-repl", config.clang_tools_dir) if not clang_repl_exe: - return False + return "" try: clang_repl_cmd = subprocess.Popen( @@ -153,7 +153,7 @@ def run_clang_repl(args): ) except OSError: print("could not exec clang-repl") - return False + return "" clang_repl_out = clang_repl_cmd.stdout.read().decode("ascii") clang_repl_cmd.wait()