From: Zvi Rackover Date: Wed, 6 Sep 2017 23:04:28 +0000 (+0000) Subject: Util: Improve update_llc_test_checks to scrub macosx-style assembly annotations X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2890a7e4e3dbdd1d94f605399608872c1cba1273;p=llvm Util: Improve update_llc_test_checks to scrub macosx-style assembly annotations Summary: In 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 Reviewers: spatel, chandlerc, craig.topper Reviewed By: spatel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D37532 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312678 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/update_llc_test_checks.py b/utils/update_llc_test_checks.py index 612422d315a..02bcc2df5d7 100755 --- a/utils/update_llc_test_checks.py +++ b/utils/update_llc_test_checks.py @@ -29,7 +29,7 @@ def llc(args, cmd_args, ir): ASM_FUNCTION_X86_RE = re.compile( r'^_?(?P[^:]+):[ \t]*#+[ \t]*@(?P=func)\n[^:]*?' r'(?P^##?[ \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(