[PATCH] D44459: [UpdateTestChecks] Handle IR variables with a '-' in the name
Alexander Richardson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 14 02:35:57 PDT 2018
arichardson created this revision.
arichardson added a reviewer: MaskRay.
Herald added a subscriber: llvm-commits.
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.
Repository:
rL LLVM
https://reviews.llvm.org/D44459
Files:
utils/UpdateTestChecks/common.py
Index: utils/UpdateTestChecks/common.py
===================================================================
--- utils/UpdateTestChecks/common.py
+++ utils/UpdateTestChecks/common.py
@@ -106,13 +106,14 @@
# 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()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44459.138310.patch
Type: text/x-patch
Size: 669 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180314/d72688b0/attachment.bin>
More information about the llvm-commits
mailing list