HomePhabricator

[lit] Use argparse instead of optparse

Description

[lit] Use argparse instead of optparse

Summary:
optparse is deprecated in Python 2.7, which is the minimum version of
Python required to run the LLVM test suite. Replace its usage in lit
with argparse, optparse's 2.7 replacement module.

argparse has several benefits over optparse, but this commit does not
make use of those benefits yet. Instead, it simply uses the new API,
and attempts to keep the number of changes to a minimum.

Confirmed that lit's test suite, as well as LLVM's regression test suite,
still pass with these changes.

Patch By Brian Gesiak!

Reviewers: ddunbar, echristo, beanz, delcypher

Subscribers: llvm-commits, mehdi_amini

Differential Revision: https://reviews.llvm.org/D25173

Details

Committed
cbienemanOct 3 2016, 3:12 PM
Differential Revision
D25173: [lit] Use argparse instead of optparse
Parents
rL283151: TargetMachine: Make the win32-macho workaround more specific.
Branches
Unknown
Tags
Unknown