瀏覽代碼

update_mir_test_checks: Support '-' in function names

Some AArch64 and AMDGPU tests have functions with hyphens in the names

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316063 91177308-0d34-0410-b5e6-96231b3b80d8
Justin Bogner 7 年之前
父節點
當前提交
f50103299d
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      utils/update_mir_test_checks.py

+ 2 - 2
utils/update_mir_test_checks.py

@@ -33,7 +33,7 @@ TRIPLE_IR_RE = re.compile(r'^\s*target\s+triple\s*=\s*"([^"]+)"$')
 CHECK_PREFIX_RE = re.compile('--?check-prefix(?:es)?[= ](\S+)')
 CHECK_PREFIX_RE = re.compile('--?check-prefix(?:es)?[= ](\S+)')
 CHECK_RE = re.compile(r'^\s*[;#]\s*([^:]+?)(?:-NEXT|-NOT|-DAG|-LABEL)?:')
 CHECK_RE = re.compile(r'^\s*[;#]\s*([^:]+?)(?:-NEXT|-NOT|-DAG|-LABEL)?:')
 
 
-FUNC_NAME_RE = re.compile(r' *name: *(?P<func>[A-Za-z0-9_.]+)')
+FUNC_NAME_RE = re.compile(r' *name: *(?P<func>[A-Za-z0-9_.-]+)')
 BODY_BEGIN_RE = re.compile(r' *body: *\|')
 BODY_BEGIN_RE = re.compile(r' *body: *\|')
 BASIC_BLOCK_RE = re.compile(r' *bb\.[0-9]+.*:$')
 BASIC_BLOCK_RE = re.compile(r' *bb\.[0-9]+.*:$')
 VREG_RE = re.compile(r'(%[0-9]+)(?::[a-z0-9_]+)?(?:\([<>a-z0-9 ]+\))?')
 VREG_RE = re.compile(r'(%[0-9]+)(?::[a-z0-9_]+)?(?:\([<>a-z0-9 ]+\))?')
@@ -45,7 +45,7 @@ PREFIX_DATA_RE = re.compile(r'^ *(;|bb.[0-9].*: *$|[a-z]+: |$)')
 MIR_FUNC_RE = re.compile(
 MIR_FUNC_RE = re.compile(
     r'^---$'
     r'^---$'
     r'\n'
     r'\n'
-    r'^ *name: *(?P<func>[A-Za-z0-9_.]+)$'
+    r'^ *name: *(?P<func>[A-Za-z0-9_.-]+)$'
     r'.*?'
     r'.*?'
     r'^ *body: *\|\n'
     r'^ *body: *\|\n'
     r'(?P<body>.*?)\n'
     r'(?P<body>.*?)\n'