HomePhabricator

[CommandLineParser] Add DefaultOption flag

Description

[CommandLineParser] Add DefaultOption flag

Summary: Add DefaultOption flag to CommandLineParser which provides a
default option or alias, but allows users to override it for some
other purpose as needed.

Also, add -h as a default alias to -help, which can be seamlessly
overridden by applications like llvm-objdump and llvm-readobj which
use -h as an alias for other options.

Reviewers: alexfh, klimek

Reviewed By: klimek

Subscribers: MaskRay, mehdi_amini, inglorion, dexonsmith, hiraditya, llvm-commits, jhenderson, arphaman, cfe-commits

Tags: #clang, #llvm

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

Details

Committed
dhintonApr 13 2019, 9:55 AM
Reviewer
klimek
Differential Revision
D59746: [CommandLineParser] Add DefaultOption flag
Branches
Unknown
Tags
Unknown