]> granicus.if.org Git - llvm/commitdiff
Teach the llc check updater to recognize the end-of-function comment
authorChandler Carruth <chandlerc@gmail.com>
Fri, 25 Aug 2017 02:32:48 +0000 (02:32 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Fri, 25 Aug 2017 02:32:48 +0000 (02:32 +0000)
used on Windows and sometimes Darwin. Cleans up generated patterns for
me quite a bit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311752 91177308-0d34-0410-b5e6-96231b3b80d8

utils/update_llc_test_checks.py

index 047f3e670ecd13f82ab8167cdcec17e504182ce8..eb8101cf3efb0b1024c6b51c5aa959546e180809 100755 (executable)
@@ -35,7 +35,7 @@ SCRUB_LOOP_COMMENT_RE = re.compile(
 ASM_FUNCTION_X86_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)',
+    r'^\s*(?:[^:\n]+?:\s*\n\s*\.size|\.cfi_endproc|\.globl|\.comm|\.(?:sub)?section|# -- End function)',
     flags=(re.M | re.S))
 SCRUB_X86_SHUFFLES_RE = (
     re.compile(
@@ -49,7 +49,7 @@ ASM_FUNCTION_ARM_RE = re.compile(
         r'^(?P<func>[0-9a-zA-Z_]+):\n' # f: (name of function)
         r'\s+\.fnstart\n' # .fnstart
         r'(?P<body>.*?)\n' # (body of the function)
-        r'.Lfunc_end[0-9]+:', # .Lfunc_end0:
+        r'.Lfunc_end[0-9]+:', # .Lfunc_end0: or # -- End function
         flags=(re.M | re.S))
 
 RUN_LINE_RE = re.compile('^\s*;\s*RUN:\s*(.*)$')