[PATCH] D37532: Util: Improve update_llc_test_checks to scrub macosx-style assembly annotations

Zvi Rackover via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 6 14:40:29 PDT 2017


zvi created this revision.

In https://reviews.llvm.org/D37523 Sanjay pointed out that the tool does not scrub macosx-style 'End of Function' annotations,
where the comments begin with a double-#.

I tested this patch by verifying all existing occurences of 'End function' are scrubbed:
find ./test/CodeGen/X86 -name '*.ll' | xargs grep -l "End function" | xargs utils/update_llc_test_checks.py --llc-binary build/bin/llc


https://reviews.llvm.org/D37532

Files:
  utils/update_llc_test_checks.py


Index: utils/update_llc_test_checks.py
===================================================================
--- utils/update_llc_test_checks.py
+++ utils/update_llc_test_checks.py
@@ -29,7 +29,7 @@
 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|# -- End function)',
+    r'^\s*(?:[^:\n]+?:\s*\n\s*\.size|\.cfi_endproc|\.globl|\.comm|\.(?:sub)?section|#+ -- End function)',
     flags=(re.M | re.S))
 
 ASM_FUNCTION_ARM_RE = re.compile(


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37532.114063.patch
Type: text/x-patch
Size: 609 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170906/31c67b5c/attachment.bin>


More information about the llvm-commits mailing list