[llvm] [AArch64] Pre-commit tests for #125686 (NFC) (PR #126643)

Tomas Matheson via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 12 03:27:53 PST 2025


================
@@ -241,16 +271,33 @@ def all_fence(f):
         )
 
 
-def header(f, triple, features, filter_args: str):
+def header(f, triple, features, filter_args: str, no_opt=False):
     f.write(
         "; NOTE: Assertions have been autogenerated by "
         "utils/update_llc_test_checks.py UTC_ARGS: "
     )
     f.write(filter_args)
     f.write("\n")
-    f.write(f"; The base test file was generated by {__file__}\n")
+
+    # __file__ changed to return absolute path in Python 3.9. Print only
+    # back to llvm-project top-level, to avoid unnecessary diffs and
+    # revealing directory structure of people running this script
+    top = "../../../../../.."
+    fp = os.path.relpath(__file__, os.path.abspath(os.path.join(__file__, top)))
+    f.write(f"; The base test file was generated by ./{fp}\n")
----------------
tmatheson-arm wrote:

We could also just hard code the filename, it's not worth much effort.

https://github.com/llvm/llvm-project/pull/126643


More information about the llvm-commits mailing list