Skip to content

Commit 4e59286

Browse files
authored
Fix run_clang_repl output when not present (#161412)
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 #157359, where the original change was introduced.
1 parent 4064c0e commit 4e59286

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/test/lit.cfg.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,15 @@ def run_clang_repl(args):
145145
clang_repl_exe = lit.util.which("clang-repl", config.clang_tools_dir)
146146

147147
if not clang_repl_exe:
148-
return False
148+
return ""
149149

150150
try:
151151
clang_repl_cmd = subprocess.Popen(
152152
[clang_repl_exe, args], stdout=subprocess.PIPE
153153
)
154154
except OSError:
155155
print("could not exec clang-repl")
156-
return False
156+
return ""
157157

158158
clang_repl_out = clang_repl_cmd.stdout.read().decode("ascii")
159159
clang_repl_cmd.wait()

0 commit comments

Comments
 (0)