diff options
author | Mircea Trofin <mtrofin@google.com> | 2020-12-16 10:20:12 -0800 |
---|---|---|
committer | Mircea Trofin <mtrofin@google.com> | 2020-12-16 21:12:06 -0800 |
commit | ed1e565aaff6a2b6ad9064bcc58c50a46100a836 (patch) | |
tree | 893cfe12b044b97839d5b3c3556862472e9de192 /llvm/utils/UpdateTestChecks/asm.py | |
parent | 541e476fc0682e71d70f6cfc7a42592910acf2a5 (diff) | |
download | llvm-ed1e565aaff6a2b6ad9064bcc58c50a46100a836.zip llvm-ed1e565aaff6a2b6ad9064bcc58c50a46100a836.tar.gz llvm-ed1e565aaff6a2b6ad9064bcc58c50a46100a836.tar.bz2 |
[NFC] factor update test function test builder as a class
This allows us to have shared logic over multiple test runs, e.g. do we
have unused prefixes, or which function bodies have conflicting outputs
for a prefix appearing in different RUN lines.
This patch is just wrapping existing functionality, and replacing its uses.
A subsequent patch would then fold the current functionality into the newly
introduced class.
Differential Revision: https://reviews.llvm.org/D93413
Diffstat (limited to 'llvm/utils/UpdateTestChecks/asm.py')
-rw-r--r-- | llvm/utils/UpdateTestChecks/asm.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/utils/UpdateTestChecks/asm.py b/llvm/utils/UpdateTestChecks/asm.py index 476e7f1..839b727 100644 --- a/llvm/utils/UpdateTestChecks/asm.py +++ b/llvm/utils/UpdateTestChecks/asm.py @@ -324,8 +324,7 @@ def get_triple_from_march(march): print("Cannot find a triple. Assume 'x86'", file=sys.stderr) return 'x86' -def build_function_body_dictionary_for_triple(args, raw_tool_output, triple, - prefixes, func_dict, func_order): +def get_run_handler(triple): target_handlers = { 'i686': (scrub_asm_x86, ASM_FUNCTION_X86_RE), 'x86': (scrub_asm_x86, ASM_FUNCTION_X86_RE), @@ -366,10 +365,7 @@ def build_function_body_dictionary_for_triple(args, raw_tool_output, triple, if handler is None: raise KeyError('Triple %r is not supported' % (triple)) - scrubber, function_re = handler - common.build_function_body_dictionary( - function_re, scrubber, [args], raw_tool_output, prefixes, - func_dict, func_order, args.verbose, False, False) + return handler ##### Generator of assembly CHECK lines |