llvm.org GIT mirror llvm / a997593
[lit] Add --version option. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203496 91177308-0d34-0410-b5e6-96231b3b80d8 Daniel Dunbar 5 years ago
1 changed file(s) with 7 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
135135 from optparse import OptionParser, OptionGroup
136136 parser = OptionParser("usage: %prog [options] {file-or-path}")
137137
138 parser.add_option("", "--version", dest="show_version",
139 help="Show version and exit",
140 action="store_true", default=False)
138141 parser.add_option("-j", "--threads", dest="numThreads", metavar="N",
139142 help="Number of testing threads",
140143 type=int, action="store", default=None)
227230
228231 (opts, args) = parser.parse_args()
229232
233 if opts.show_version:
234 print "lit %s" % (lit.__version__,)
235 return
236
230237 if not args:
231238 parser.error('No inputs specified')
232239