[clang] [llvm] Handle leading underscores in update_cc_test_checks.py (PR #121800)

Momchil Velikov via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 13 01:57:06 PST 2025


================
@@ -557,6 +557,10 @@ def invoke_tool(exe, cmd_args, ir, preprocess_cmd=None, verbose=False):
 UTC_AVOID = "NOTE: Do not autogenerate"
 UNUSED_NOTE = "NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:"
 
+DATA_LAYOUT_RE = re.compile(
+    r"target\sdatalayout\s=\s\"(?P<layout>.+)\"$", flags=(re.M | re.S)
----------------
momchil-velikov wrote:

Done for the `\s+` part. Given we're not parsing hand-written LLVM IR, I think we can get away with a certain lack of flexibility.

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


More information about the llvm-commits mailing list