aboutsummaryrefslogtreecommitdiff
path: root/llvm/utils/UpdateTestChecks/common.py
diff options
context:
space:
mode:
authorDavid Greene <dag@cray.com>2020-01-23 14:30:32 -0600
committerDavid Greene <dag@hpe.com>2020-09-16 14:34:18 -0500
commitce0eb81c72749d1e96cfc6fb68af3c24b63753cc (patch)
treee67097ddc172bf80350594d8d6fa1759a5776340 /llvm/utils/UpdateTestChecks/common.py
parent2a078a977e90481954eef69b489fac650ddbdaf6 (diff)
downloadllvm-ce0eb81c72749d1e96cfc6fb68af3c24b63753cc.zip
llvm-ce0eb81c72749d1e96cfc6fb68af3c24b63753cc.tar.gz
llvm-ce0eb81c72749d1e96cfc6fb68af3c24b63753cc.tar.bz2
[UpdateTestChecks] Allow $ in function names
Some compilers generation functions with '$' in their names, so recognize those functions. This also requires recognizing function names inside quotes in some contexts in order to escape certain characters. Differential Revision: https://reviews.llvm.org/D82995
Diffstat (limited to 'llvm/utils/UpdateTestChecks/common.py')
-rw-r--r--llvm/utils/UpdateTestChecks/common.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/utils/UpdateTestChecks/common.py b/llvm/utils/UpdateTestChecks/common.py
index a1759b4..d49fe50 100644
--- a/llvm/utils/UpdateTestChecks/common.py
+++ b/llvm/utils/UpdateTestChecks/common.py
@@ -145,16 +145,16 @@ UTC_ARGS_CMD = re.compile(r'.*' + UTC_ARGS_KEY + '\s*(?P<cmd>.*)\s*$')
UTC_ADVERT = 'NOTE: Assertions have been autogenerated by '
OPT_FUNCTION_RE = re.compile(
- r'^(\s*;\s*Function\sAttrs:\s(?P<attrs>[\w\s]+?))?\s*define\s+(?:internal\s+)?[^@]*@(?P<func>[\w.-]+?)\s*'
+ r'^(\s*;\s*Function\sAttrs:\s(?P<attrs>[\w\s]+?))?\s*define\s+(?:internal\s+)?[^@]*@(?P<func>[\w.$-]+?)\s*'
r'(?P<args_and_sig>\((\)|(.*?[\w.-]+?)\))[^{]*\{)\n(?P<body>.*?)^\}$',
flags=(re.M | re.S))
ANALYZE_FUNCTION_RE = re.compile(
- r'^\s*\'(?P<analysis>[\w\s-]+?)\'\s+for\s+function\s+\'(?P<func>[\w.-]+?)\':'
+ r'^\s*\'(?P<analysis>[\w\s-]+?)\'\s+for\s+function\s+\'(?P<func>[\w.$-]+?)\':'
r'\s*\n(?P<body>.*)$',
flags=(re.X | re.S))
-IR_FUNCTION_RE = re.compile(r'^\s*define\s+(?:internal\s+)?[^@]*@([\w.-]+)\s*\(')
+IR_FUNCTION_RE = re.compile(r'^\s*define\s+(?:internal\s+)?[^@]*@"?([\w.$-]+)"?\s*\(')
TRIPLE_IR_RE = re.compile(r'^\s*target\s+triple\s*=\s*"([^"]+)"$')
TRIPLE_ARG_RE = re.compile(r'-mtriple[= ]([^ ]+)')
MARCH_ARG_RE = re.compile(r'-march[= ]([^ ]+)')