[UpdateTestChecks] Make generation of UTC_ARGS: comment more robust
authorAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Thu, 23 Apr 2020 12:02:12 +0000 (13:02 +0100)
committerAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Thu, 23 Apr 2020 12:12:27 +0000 (13:12 +0100)
commitf50bc823fe6f4279eb2f426dd54f3151878c0216
treed0d4930bad37f1086295db674a0cfa04dcd7e72e
parentbbcfce4badac3dfeb64c1bb413bbe0dc53eca326
[UpdateTestChecks] Make generation of UTC_ARGS: comment more robust

We now use the argparse Action objects to determine the name of the flags.
This fixes cases where the key for the stored result ('dest') is not the
same as the command line flag (e.g. --enable/--disable).
Also add a test that --disabled can be part of the initial UTC_ARGS.

This is split out from D78478

Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D78617
llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/on_the_fly_arg_change.ll.initially_disabled.expected [new file with mode: 0644]
llvm/test/tools/UpdateTestChecks/update_test_checks/on_the_fly_arg_change.test
llvm/utils/UpdateTestChecks/common.py