]> granicus.if.org Git - llvm/commitdiff
update_mir_test_checks: Support '-' in function names
authorJustin Bogner <mail@justinbogner.com>
Wed, 18 Oct 2017 05:52:56 +0000 (05:52 +0000)
committerJustin Bogner <mail@justinbogner.com>
Wed, 18 Oct 2017 05:52:56 +0000 (05:52 +0000)
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

utils/update_mir_test_checks.py

index c453a282238669efc4b96bb641b1eb6cd44c2999..48f3eead3e5ed225dfcee3f3668628a7c03d25ab 100755 (executable)
@@ -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_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: *\|')
 BASIC_BLOCK_RE = re.compile(r' *bb\.[0-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(
     r'^---$'
     r'\n'
-    r'^ *name: *(?P<func>[A-Za-z0-9_.]+)$'
+    r'^ *name: *(?P<func>[A-Za-z0-9_.-]+)$'
     r'.*?'
     r'^ *body: *\|\n'
     r'(?P<body>.*?)\n'