diff options
author | Alex Richardson <Alexander.Richardson@cl.cam.ac.uk> | 2019-12-02 18:18:47 +0000 |
---|---|---|
committer | Alex Richardson <Alexander.Richardson@cl.cam.ac.uk> | 2019-12-02 18:18:47 +0000 |
commit | 3b55eebd239ee7d518a95ca9ecccf879b17d7e8c (patch) | |
tree | 781174b4e273eac3dde653be4def5d3121171582 /llvm/utils/UpdateTestChecks/common.py | |
parent | 62ab949248d88be0215921f047dd82b02b99138c (diff) | |
download | llvm-3b55eebd239ee7d518a95ca9ecccf879b17d7e8c.zip llvm-3b55eebd239ee7d518a95ca9ecccf879b17d7e8c.tar.gz llvm-3b55eebd239ee7d518a95ca9ecccf879b17d7e8c.tar.bz2 |
[update_cc_test_checks.py] Use CHECK_RE from common
Summary:
This change modifies the common.CHECK_RE regex to also handle '//'
comment prefixes which allows us to share it between clang and IR tests.
Using the regex from common means that *-SAME lines are also stripped
now. Before this change using the --function-signature flag would result
in -SAME: lines from previous runs not being removed.
Reviewers: MaskRay, jdoerfert
Reviewed By: jdoerfert
Subscribers: jdoerfert, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70890
Diffstat (limited to 'llvm/utils/UpdateTestChecks/common.py')
-rw-r--r-- | llvm/utils/UpdateTestChecks/common.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/utils/UpdateTestChecks/common.py b/llvm/utils/UpdateTestChecks/common.py index dfb3b16..5cf7901 100644 --- a/llvm/utils/UpdateTestChecks/common.py +++ b/llvm/utils/UpdateTestChecks/common.py @@ -61,7 +61,7 @@ def invoke_tool(exe, cmd_args, ir): RUN_LINE_RE = re.compile(r'^\s*(?://|[;#])\s*RUN:\s*(.*)$') CHECK_PREFIX_RE = re.compile(r'--?check-prefix(?:es)?[= ](\S+)') PREFIX_RE = re.compile('^[a-zA-Z0-9_-]+$') -CHECK_RE = re.compile(r'^\s*[;#]\s*([^:]+?)(?:-NEXT|-NOT|-DAG|-LABEL|-SAME)?:') +CHECK_RE = re.compile(r'^\s*(?://|[;#])\s*([^:]+?)(?:-NEXT|-NOT|-DAG|-LABEL|-SAME)?:') OPT_FUNCTION_RE = re.compile( r'^\s*define\s+(?:internal\s+)?[^@]*@(?P<func>[\w-]+?)\s*' |