[PATCH] D70890: [update_cc_test_checks.py] Use CHECK_RE from common

Phabricator via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 2 10:25:18 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rG3b55eebd239e: [update_cc_test_checks.py] Use CHECK_RE from common (authored by Alex Richardson <Alexander.Richardson at cl.cam.ac.uk>).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70890/new/

https://reviews.llvm.org/D70890

Files:
  llvm/utils/UpdateTestChecks/common.py
  llvm/utils/update_cc_test_checks.py


Index: llvm/utils/update_cc_test_checks.py
===================================================================
--- llvm/utils/update_cc_test_checks.py
+++ llvm/utils/update_cc_test_checks.py
@@ -28,8 +28,6 @@
 
 ADVERT = '// NOTE: Assertions have been autogenerated by '
 
-CHECK_RE = re.compile(r'^\s*//\s*([^:]+?)(?:-NEXT|-NOT|-DAG|-LABEL)?:')
-
 SUBST = {
     '%clang': [],
     '%clang_cc1': ['-cc1'],
@@ -238,7 +236,7 @@
     input_lines = []
     with open(filename, 'r+') as f:
       for line in f:
-        m = CHECK_RE.match(line)
+        m = common.CHECK_RE.match(line)
         if not (m and m.group(1) in prefix_set) and line != '//\n':
           input_lines.append(line)
       f.seek(0)
Index: llvm/utils/UpdateTestChecks/common.py
===================================================================
--- llvm/utils/UpdateTestChecks/common.py
+++ llvm/utils/UpdateTestChecks/common.py
@@ -61,7 +61,7 @@
 RUN_LINE_RE = re.compile(r'^\s*(?://|[;#])\s*RUN:\s*(.*)$')
 CHECK_PREFIX_RE = re.compile(r'--?check-prefix(?:es)?[= ](\S+)')
 PREFIX_RE = re.compile('^[a-zA-Z0-9_-]+$')
-CHECK_RE = re.compile(r'^\s*[;#]\s*([^:]+?)(?:-NEXT|-NOT|-DAG|-LABEL|-SAME)?:')
+CHECK_RE = re.compile(r'^\s*(?://|[;#])\s*([^:]+?)(?:-NEXT|-NOT|-DAG|-LABEL|-SAME)?:')
 
 OPT_FUNCTION_RE = re.compile(
     r'^\s*define\s+(?:internal\s+)?[^@]*@(?P<func>[\w-]+?)\s*'


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70890.231732.patch
Type: text/x-patch
Size: 1357 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191202/ef80d165/attachment.bin>


More information about the llvm-commits mailing list