[lit] Create one output file when `--output` is specified more than once
authorJulian Lettner <julian.lettner@apple.com>
Tue, 5 May 2020 04:36:20 +0000 (21:36 -0700)
committerJulian Lettner <julian.lettner@apple.com>
Tue, 5 May 2020 04:36:20 +0000 (21:36 -0700)
commit47b25c3323c5919bb3f96a432369cc8d8f5f3117
tree0742b212b491aab38a71b673ed9eb02ea51630be
parentb7438c25eace5ecdb5ec87a23dd2a587d8ae7572
[lit] Create one output file when `--output` is specified more than once

The argparse 'append' action concatenates multiple occurrences of an
argument (even when we specify `nargs=1` or `nargs='?'`).  This means
that we create multiple identical output files if the `--output`
argument is given more than once.  This isn't useful and we instead want
this to behave like a standard optional argument: last occurrence wins.
llvm/utils/lit/lit/cl_arguments.py