[llvm] r264422 - fix IR function name regex to allow hyphens

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 25 10:00:12 PDT 2016


Author: spatel
Date: Fri Mar 25 12:00:12 2016
New Revision: 264422

URL: http://llvm.org/viewvc/llvm-project?rev=264422&view=rev
Log:
fix IR function name regex to allow hyphens

Modified:
    llvm/trunk/utils/update_test_checks.py

Modified: llvm/trunk/utils/update_test_checks.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/update_test_checks.py?rev=264422&r1=264421&r2=264422&view=diff
==============================================================================
--- llvm/trunk/utils/update_test_checks.py (original)
+++ llvm/trunk/utils/update_test_checks.py Fri Mar 25 12:00:12 2016
@@ -31,14 +31,14 @@ SCRUB_KILL_COMMENT_RE = re.compile(r'^ *
 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+)')




More information about the llvm-commits mailing list