diff options
author | Kang Zhang <shkzhang@cn.ibm.com> | 2020-04-10 06:09:01 +0000 |
---|---|---|
committer | Kang Zhang <shkzhang@cn.ibm.com> | 2020-04-10 06:09:01 +0000 |
commit | 8633ef0f4331b62618deafffd591b7e97eebd096 (patch) | |
tree | d63fbe33ba376d81535c2780f61cff5436916efd /llvm/utils/UpdateTestChecks/common.py | |
parent | b7d5229d789b7cb2747226d528ed016624b11cea (diff) | |
download | llvm-8633ef0f4331b62618deafffd591b7e97eebd096.zip llvm-8633ef0f4331b62618deafffd591b7e97eebd096.tar.gz llvm-8633ef0f4331b62618deafffd591b7e97eebd096.tar.bz2 |
[PowerPC][UpdateTestChecks] Remove the extra # when scrubbing loop comments
Summary:
The patch D63957 is to avoid empty string when scrubbing loop comments,
it will replace loop comments to a `#`, that's correct.
But if the line has something else not only loop comments, we will get
a extra `#`.
The patch is to remove the extra `#`.
Reviewed By: jsji
Differential Revision: https://reviews.llvm.org/D77357
Diffstat (limited to 'llvm/utils/UpdateTestChecks/common.py')
-rw-r--r-- | llvm/utils/UpdateTestChecks/common.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/utils/UpdateTestChecks/common.py b/llvm/utils/UpdateTestChecks/common.py index e35f4b1..86b36ee 100644 --- a/llvm/utils/UpdateTestChecks/common.py +++ b/llvm/utils/UpdateTestChecks/common.py @@ -89,6 +89,7 @@ SCRUB_TRAILING_WHITESPACE_AND_ATTRIBUTES_RE = re.compile(r'([ \t]|(#[0-9]+))+$', SCRUB_KILL_COMMENT_RE = re.compile(r'^ *#+ +kill:.*\n') SCRUB_LOOP_COMMENT_RE = re.compile( r'# =>This Inner Loop Header:.*|# in Loop:.*', flags=re.M) +SCRUB_TAILING_COMMENT_TOKEN_RE = re.compile(r'(?<=\S)+[ \t]*#$', flags=re.M) def error(msg, test_file=None): |