[llvm] Change update_xxx_checks to continue on error when processing mutliple inputs (PR #137728)
Scott Linder via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 29 12:47:46 PDT 2025
================
@@ -570,13 +572,16 @@ def main():
if "llvm-mca" not in os.path.basename(args.llvm_mca_binary):
_warn("unexpected binary name: {}".format(args.llvm_mca_binary))
+ returncode = 0
for ti in common.itertests(args.tests, parser, script_name=script_name):
try:
update_test_file(ti.args, ti.path, ti.test_autogenerated_note)
except Exception:
- common.warn("Error processing file", test_file=ti.path)
- raise
- return 0
+ stderr.write(f"Error: Failed to update test {ti.path}\n")
+ print_exc()
+ returncode = 1
+ return returncode
+
if __name__ == "__main__":
try:
----------------
slinder1 wrote:
Another one I can't comment on directly, but it seems like the `except Error as e:` clause below is almost dead code now, save for the single `raise Error("--llvm-mca-binary value cannot be empty string")` in `main`
I'd suggest `main` just print the message directly, and main be considered basically `noexcept` here, unless I'm missing something
https://github.com/llvm/llvm-project/pull/137728
More information about the llvm-commits
mailing list