diff options
author | Don Hinton <hintonda@gmail.com> | 2019-05-11 20:27:01 +0000 |
---|---|---|
committer | Don Hinton <hintonda@gmail.com> | 2019-05-11 20:27:01 +0000 |
commit | 0303e8a3fd88e0da8732144f34033123d3ed83b4 (patch) | |
tree | 6d9afa53229393aca2c5f78b6e229095b089cbe4 /llvm/include/llvm/Support/CommandLine.h | |
parent | 73e8b6743820ff83bb07f565f7f22a575e1e38fe (diff) | |
download | bcm5719-llvm-0303e8a3fd88e0da8732144f34033123d3ed83b4.tar.gz bcm5719-llvm-0303e8a3fd88e0da8732144f34033123d3ed83b4.zip |
[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
Diffstat (limited to 'llvm/include/llvm/Support/CommandLine.h')
-rw-r--r-- | llvm/include/llvm/Support/CommandLine.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/include/llvm/Support/CommandLine.h b/llvm/include/llvm/Support/CommandLine.h index 68cbebe5de8..d144c9b0f0f 100644 --- a/llvm/include/llvm/Support/CommandLine.h +++ b/llvm/include/llvm/Support/CommandLine.h @@ -66,7 +66,8 @@ namespace cl { bool ParseCommandLineOptions(int argc, const char *const *argv, StringRef Overview = "", raw_ostream *Errs = nullptr, - const char *EnvVar = nullptr); + const char *EnvVar = nullptr, + bool LongOptionsUseDoubleDash = false); //===----------------------------------------------------------------------===// // ParseEnvironmentOptions - Environment variable option processing alternate |