[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_test_checks.py b/llvm/utils/update_test_checks.py
index 97bf6e9..31122b2 100755
--- a/llvm/utils/update_test_checks.py
+++ b/llvm/utils/update_test_checks.py
@@ -56,20 +56,16 @@
 def main():
   from argparse import RawTextHelpFormatter
   parser = argparse.ArgumentParser(description=__doc__, formatter_class=RawTextHelpFormatter)
-  parser.add_argument('-v', '--verbose', action='store_true',
-                      help='Show verbose output')
   parser.add_argument('--opt-binary', default='opt',
                       help='The opt binary used to generate the test case')
   parser.add_argument(
       '--function', help='The function in the test file to update')
-  parser.add_argument('-u', '--update-only', action='store_true',
-                      help='Only update test if it was already autogened')
   parser.add_argument('-p', '--preserve-names', action='store_true',
                       help='Do not scrub IR names')
   parser.add_argument('--function-signature', action='store_true',
                       help='Keep function signature information around for the check line')
   parser.add_argument('tests', nargs='+')
-  args = parser.parse_args()
+  args = common.parse_commandline_args(parser)
 
   script_name = os.path.basename(__file__)
   autogenerated_note = (ADVERT + 'utils/' + script_name)