[CommandLine] Add long option flag for cl::ParseCommandLineOptions . Part 5 of 5
authorDon Hinton <hintonda@gmail.com>
Sat, 11 May 2019 20:27:01 +0000 (20:27 +0000)
committerDon Hinton <hintonda@gmail.com>
Sat, 11 May 2019 20:27:01 +0000 (20:27 +0000)
commit0303e8a3fd88e0da8732144f34033123d3ed83b4
tree6d9afa53229393aca2c5f78b6e229095b089cbe4
parent73e8b6743820ff83bb07f565f7f22a575e1e38fe
[CommandLine] Add long option flag for cl::ParseCommandLineOptions . Part 5 of 5

Summary:
If passed, the long option flag makes the CommandLine parser
mimic the behavior or GNU getopt_long.  Short options are a single
character prefixed by a single dash, and long options are multiple
characters prefixed by a double dash.

This patch was motivated by the discussion in the following thread:
http://lists.llvm.org/pipermail/llvm-dev/2019-April/131786.html

Reviewed By: MaskRay

Tags: #llvm

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

llvm-svn: 360532
llvm/include/llvm/Support/CommandLine.h
llvm/lib/Support/CommandLine.cpp
llvm/unittests/Support/CommandLineTest.cpp