Skip to content

Commit

Permalink
[lit] Add --version option.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203496 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
ddunbar committed Mar 10, 2014
1 parent 55aa019 commit a997593
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions utils/lit/lit/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ def main(builtinParameters = {}):
from optparse import OptionParser, OptionGroup
parser = OptionParser("usage: %prog [options] {file-or-path}")

parser.add_option("", "--version", dest="show_version",
help="Show version and exit",
action="store_true", default=False)
parser.add_option("-j", "--threads", dest="numThreads", metavar="N",
help="Number of testing threads",
type=int, action="store", default=None)
Expand Down Expand Up @@ -228,6 +231,10 @@ def main(builtinParameters = {}):

(opts, args) = parser.parse_args()

if opts.show_version:
print "lit %s" % (lit.__version__,)
return

if not args:
parser.error('No inputs specified')

Expand Down

0 comments on commit a997593

Please sign in to comment.