diff options
author | Alex Richardson <Alexander.Richardson@cl.cam.ac.uk> | 2019-11-20 13:20:15 +0000 |
---|---|---|
committer | Alex Richardson <Alexander.Richardson@cl.cam.ac.uk> | 2019-11-20 13:23:26 +0000 |
commit | 50807c81eaeead17277ebf98ce1cc6272370d143 (patch) | |
tree | cbfe0e6bb400ec3b906310fe571f9d2f4ae94280 /llvm/utils/update_cc_test_checks.py | |
parent | 6187394dd05ea20db01370b1990a79d517d98f7e (diff) | |
download | bcm5719-llvm-50807c81eaeead17277ebf98ce1cc6272370d143.tar.gz bcm5719-llvm-50807c81eaeead17277ebf98ce1cc6272370d143.zip |
[update_cc_test_checks.py] Add the --function-signature flag
Summary:
This was added to update_test_checks.py in D68819 and I believe having it
in update_cc_test_checks.py is also useful.
Reviewers: jdoerfert, MaskRay
Reviewed By: MaskRay
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70429
Diffstat (limited to 'llvm/utils/update_cc_test_checks.py')
-rwxr-xr-x | llvm/utils/update_cc_test_checks.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/utils/update_cc_test_checks.py b/llvm/utils/update_cc_test_checks.py index 4358acce016..a3227c67743 100755 --- a/llvm/utils/update_cc_test_checks.py +++ b/llvm/utils/update_cc_test_checks.py @@ -103,6 +103,8 @@ def config(): parser.add_argument( '--x86_extra_scrub', action='store_true', help='Use more regex for x86 matching to reduce diffs between various subtargets') + parser.add_argument('--function-signature', action='store_true', + help='Keep function signature information around for the check line') parser.add_argument('tests', nargs='+') args = common.parse_commandline_args(parser) args.clang_args = shlex.split(args.clang_args or '') @@ -162,7 +164,7 @@ def get_function_body(args, filename, clang_args, extra_commands, prefixes, trip if '-emit-llvm' in clang_args: common.build_function_body_dictionary( common.OPT_FUNCTION_RE, common.scrub_body, [], - raw_tool_output, prefixes, func_dict, args.verbose, False) + raw_tool_output, prefixes, func_dict, args.verbose, args.function_signature) else: print('The clang command line should include -emit-llvm as asm tests ' 'are discouraged in Clang testsuite.', file=sys.stderr) @@ -288,7 +290,8 @@ def main(): if added: output_lines.append('//') added.add(mangled) - common.add_ir_checks(output_lines, '//', run_list, func_dict, mangled, False, False) + common.add_ir_checks(output_lines, '//', run_list, func_dict, mangled, + False, args.function_signature) output_lines.append(line.rstrip('\n')) # Update the test file. |