[llvm] [utils][UpdateTestChecks] Warn about possible target triple mismatch (PR #149645)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 19 01:39:16 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {darker}-->
:warning: Python code formatter, darker found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
darker --check --diff -r HEAD~1...HEAD llvm/utils/UpdateTestChecks/common.py llvm/utils/update_llc_test_checks.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- UpdateTestChecks/common.py 2025-07-19 08:36:26.000000 +0000
+++ UpdateTestChecks/common.py 2025-07-19 08:38:51.886676 +0000
@@ -879,11 +879,11 @@
def process_run_line(self, function_re, scrubber, raw_tool_output, prefixes):
build_global_values_dictionary(
self._global_var_dict, raw_tool_output, prefixes, self._ginfo
)
-
+
processed_func_count = 0
for m in function_re.finditer(raw_tool_output):
if not m:
continue
processed_func_count += 1
@@ -1001,11 +1001,11 @@
# An earlier RUN line used this check prefixes but didn't produce
# a body for this function. This happens in Clang tests that use
# preprocesser directives to exclude individual functions from some
# RUN lines.
self._func_dict[prefix][func] = None
- return processed_func_count
+ return processed_func_count
def processed_prefixes(self, prefixes):
"""
Mark a set of prefixes as having had at least one applicable RUN line fully
processed. This is used to filter out function bodies that don't have
--- update_llc_test_checks.py 2025-07-19 08:36:26.000000 +0000
+++ update_llc_test_checks.py 2025-07-19 08:38:52.014386 +0000
@@ -140,12 +140,16 @@
triple = triple_in_cmd or triple_in_ir
if not triple:
triple = common.get_triple_from_march(march_in_cmd)
scrubber, function_re = output_type.get_run_handler(triple)
- if not builder.process_run_line(function_re, scrubber, raw_tool_output, prefixes):
- common.warn("Couldn't match any function. Possibly the wrong target triple has been provided")
+ if not builder.process_run_line(
+ function_re, scrubber, raw_tool_output, prefixes
+ ):
+ common.warn(
+ "Couldn't match any function. Possibly the wrong target triple has been provided"
+ )
builder.processed_prefixes(prefixes)
func_dict = builder.finish_and_get_func_dict()
global_vars_seen_dict = {}
``````````
</details>
https://github.com/llvm/llvm-project/pull/149645
More information about the llvm-commits
mailing list