OSDN Git Service

fix IR function name regex to allow hyphens
authorSanjay Patel <spatel@rotateright.com>
Fri, 25 Mar 2016 17:00:12 +0000 (17:00 +0000)
committerSanjay Patel <spatel@rotateright.com>
Fri, 25 Mar 2016 17:00:12 +0000 (17:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264422 91177308-0d34-0410-b5e6-96231b3b80d8

utils/update_test_checks.py

index bf698c9..f43d12c 100755 (executable)
@@ -31,14 +31,14 @@ SCRUB_KILL_COMMENT_RE = re.compile(r'^ *#+ +kill:.*\n')
 SCRUB_IR_COMMENT_RE = re.compile(r'\s*;.*')
 
 RUN_LINE_RE = re.compile('^\s*;\s*RUN:\s*(.*)$')
-IR_FUNCTION_RE = re.compile('^\s*define\s+(?:internal\s+)?[^@]*@(\w+)\s*\(')
+IR_FUNCTION_RE = re.compile('^\s*define\s+(?:internal\s+)?[^@]*@([\w-]+)\s*\(')
 LLC_FUNCTION_RE = re.compile(
     r'^_?(?P<func>[^:]+):[ \t]*#+[ \t]*@(?P=func)\n[^:]*?'
     r'(?P<body>^##?[ \t]+[^:]+:.*?)\s*'
     r'^\s*(?:[^:\n]+?:\s*\n\s*\.size|\.cfi_endproc|\.globl|\.comm|\.(?:sub)?section)',
     flags=(re.M | re.S))
 OPT_FUNCTION_RE = re.compile(
-    r'^\s*define\s+(?:internal\s+)?[^@]*@(?P<func>\w+?)\s*\('
+    r'^\s*define\s+(?:internal\s+)?[^@]*@(?P<func>[\w-]+?)\s*\('
     r'(\s+)?[^{]*\{\n(?P<body>.*?)\}',
     flags=(re.M | re.S))
 CHECK_PREFIX_RE = re.compile('--check-prefix=(\S+)')