[UptestTestChecks][NFC] Share some common command line options code

Summary:
Add a function common.parse_commandline_args() that adds options common
to all tools (--verbose and --update-only) and returns the parsed
commandline arguments. I plan to use the shared parsing of --verbose in a
follow-up commit to remove most of the `if args.verbose:` checks in the
scripts.

Reviewers: xbolva00, MaskRay

Reviewed By: MaskRay

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70428
diff --git a/llvm/utils/update_cc_test_checks.py b/llvm/utils/update_cc_test_checks.py
index 79753ac..4358acc 100755
--- a/llvm/utils/update_cc_test_checks.py
+++ b/llvm/utils/update_cc_test_checks.py
@@ -90,7 +90,6 @@
   parser = argparse.ArgumentParser(
       description=__doc__,
       formatter_class=argparse.RawTextHelpFormatter)
-  parser.add_argument('-v', '--verbose', action='store_true')
   parser.add_argument('--llvm-bin', help='llvm $prefix/bin path')
   parser.add_argument('--clang',
                       help='"clang" executable, defaults to $llvm_bin/clang')
@@ -104,10 +103,8 @@
   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('-u', '--update-only', action='store_true',
-                      help='Only update test if it was already autogened')
   parser.add_argument('tests', nargs='+')
-  args = parser.parse_args()
+  args = common.parse_commandline_args(parser)
   args.clang_args = shlex.split(args.clang_args or '')
 
   if args.clang is None: