[llvm] added a script to update llvm-mc test file (PR #107246)

Alexander Richardson via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 16 09:55:47 PDT 2024


================
@@ -0,0 +1,349 @@
+#!/usr/bin/env python3
+"""
+A test update script.  This script is a utility to update LLVM 'llvm-mc' based test cases with new FileCheck patterns.
+"""
+
+from __future__ import print_function
+
+import argparse
+import os  # Used to advertise this file's name ("autogenerated_note").
+
+from UpdateTestChecks import common
+
+import subprocess
+import re
+
+mc_LIKE_TOOLS = [
+    "llvm-mc",
+    "not llvm-mc",
+]
+
+ERROR_RE = re.compile(r"(warning|error): .*")
----------------
arichardson wrote:

```suggestion
ERROR_RE = re.compile(r"\d+:(\d+): (warning|error): .*")
```
Something like this should allow capturing the error column

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


More information about the llvm-commits mailing list