summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Richardson <arichardson.kde@gmail.com>2018-03-14 20:28:53 +0000
committerAlexander Richardson <arichardson.kde@gmail.com>2018-03-14 20:28:53 +0000
commit115b0673b67fe826cee1bc7a145c324ec41c2140 (patch)
tree2955a94f57e6ee842e74eeadcba5b7dbb371f048
parent8364901f2479effe999386b2abd04e7b5108782c (diff)
downloadbcm5719-llvm-115b0673b67fe826cee1bc7a145c324ec41c2140.tar.gz
bcm5719-llvm-115b0673b67fe826cee1bc7a145c324ec41c2140.zip
[UpdateTestChecks] Handle IR variables with a '-' in the name
Summary: I noticed that clang will emit variables such as %indirect-arg-temp when running update_cc1_test_checks.py and therefore update_cc1_test_checks.py wasn't adding FileCheck captures for those variables. Reviewers: MaskRay Reviewed By: MaskRay Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D44459 llvm-svn: 327564
-rw-r--r--llvm/utils/UpdateTestChecks/common.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/utils/UpdateTestChecks/common.py b/llvm/utils/UpdateTestChecks/common.py
index 5af554b15b5..6fb5eef5763 100644
--- a/llvm/utils/UpdateTestChecks/common.py
+++ b/llvm/utils/UpdateTestChecks/common.py
@@ -106,13 +106,14 @@ SCRUB_IR_COMMENT_RE = re.compile(r'\s*;.*')
# Match things that look at identifiers, but only if they are followed by
# spaces, commas, paren, or end of the string
-IR_VALUE_RE = re.compile(r'(\s+)%([\w\.]+?)([,\s\(\)]|\Z)')
+IR_VALUE_RE = re.compile(r'(\s+)%([\w\.\-]+?)([,\s\(\)]|\Z)')
# Create a FileCheck variable name based on an IR name.
def get_value_name(var):
if var.isdigit():
var = 'TMP' + var
var = var.replace('.', '_')
+ var = var.replace('-', '_')
return var.upper()
OpenPOWER on IntegriCloud