mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
[Utils][NFC] Rename replace-function-regex in update_cc_test_checks
This patch renames the replace-function-regex to replace-value-regex to indicate that the existing regex replacement functionality can replace any IR value besides functions. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D101934
This commit is contained in:
parent
ac7c6e9962
commit
f8c111d015
@ -32,8 +32,8 @@ def parse_commandline_args(parser):
|
||||
help='Activate CHECK line generation from this point forward')
|
||||
parser.add_argument('--disable', action='store_false', dest='enabled',
|
||||
help='Deactivate CHECK line generation from this point forward')
|
||||
parser.add_argument('--replace-function-regex', nargs='+', default=[],
|
||||
help='List of regular expressions to replace matching function names')
|
||||
parser.add_argument('--replace-value-regex', nargs='+', default=[],
|
||||
help='List of regular expressions to replace matching value names')
|
||||
parser.add_argument('--prefix-filecheck-ir-name', default='',
|
||||
help='Add a prefix to FileCheck IR value names to avoid conflicts with scripted names')
|
||||
args = parser.parse_args()
|
||||
@ -297,7 +297,7 @@ class FunctionTestBuilder:
|
||||
self._check_attributes = flags.check_attributes
|
||||
self._scrubber_args = scrubber_args
|
||||
# Strip double-quotes if input was read by UTC_ARGS
|
||||
self._replace_function_regex = list(map(lambda x: x.strip('"'), flags.replace_function_regex))
|
||||
self._replace_value_regex = list(map(lambda x: x.strip('"'), flags.replace_value_regex))
|
||||
self._func_dict = {}
|
||||
self._func_order = {}
|
||||
self._global_var_dict = {}
|
||||
@ -372,7 +372,7 @@ class FunctionTestBuilder:
|
||||
continue
|
||||
|
||||
# Replace function names matching the regex.
|
||||
for regex in self._replace_function_regex:
|
||||
for regex in self._replace_value_regex:
|
||||
# Pattern that matches capture groups in the regex in leftmost order.
|
||||
group_regex = re.compile('\(.*?\)')
|
||||
# Replace function name with regex.
|
||||
|
@ -114,7 +114,7 @@ def main():
|
||||
'verbose': args.verbose,
|
||||
'function_signature': False,
|
||||
'check_attributes': False,
|
||||
'replace_function_regex': []}),
|
||||
'replace_value_regex': []}),
|
||||
scrubber_args = [])
|
||||
|
||||
for prefixes, opt_args in prefix_list:
|
||||
|
@ -108,12 +108,12 @@ def main():
|
||||
check_indent = ''
|
||||
|
||||
builder = common.FunctionTestBuilder(
|
||||
run_list=run_list,
|
||||
run_list=run_list,
|
||||
flags=type('', (object,), {
|
||||
'verbose': ti.args.verbose,
|
||||
'function_signature': False,
|
||||
'check_attributes': False,
|
||||
'replace_function_regex': []}),
|
||||
'replace_value_regex': []}),
|
||||
scrubber_args=[ti.args])
|
||||
|
||||
for prefixes, llc_tool, llc_args, preprocess_cmd, triple_in_cmd, march_in_cmd in run_list:
|
||||
|
Loading…
Reference in New Issue
Block a user