Skip to content

Commit

Permalink
Fix break introduced by D124306
Browse files Browse the repository at this point in the history
argparse.BooleanOptionalAction is not supported until python 3.9.
  • Loading branch information
mtrofin committed May 26, 2022
1 parent 6273b5c commit 6ddc4cd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions llvm/utils/UpdateTestChecks/common.py
Expand Up @@ -131,8 +131,10 @@ def __call__(self, parser, namespace, values, option_string=None):
help='List of regular expressions that a global value declaration must match to generate a check (has no effect if checking globals is not enabled)')
parser.add_argument('--global-hex-value-regex', nargs='+', default=[],
help='List of regular expressions such that, for matching global value declarations, literal integer values should be encoded in hex in the associated FileCheck directives')
parser.add_argument('--generate-body-for-unused-prefixes',
action=argparse.BooleanOptionalAction,
# FIXME: in 3.9, we can use argparse.BooleanOptionalAction. At that point,
# we need to rename the flag to just -generate-body-for-unused-prefixes.
parser.add_argument('--no-generate-body-for-unused-prefixes',
action='store_false',
dest='gen_unused_prefix_body',
default=True,
help='Generate a function body that always matches for unused prefixes. This is useful when unused prefixes are desired, and it avoids needing to annotate each FileCheck as allowing them.')
Expand Down

0 comments on commit 6ddc4cd

Please sign in to comment.