Add support for prefix-only CLI options
authorThomas Preud'homme <thomasp@graphcore.ai>
Mon, 14 Jan 2019 09:28:53 +0000 (09:28 +0000)
committerThomas Preud'homme <thomasp@graphcore.ai>
Mon, 14 Jan 2019 09:28:53 +0000 (09:28 +0000)
commiteea49edd70d5191ab4c8fe0524ddd0bc869502ef
tree5294bd08be0ac14cee9335e792031ff9550ab739
parenteebe489c8e5fa923e91eeed2ab082ba27d6633b2
Add support for prefix-only CLI options

Summary:
Add support for options that always prefix their value, giving an error
if the value is in the next argument or if the option is given a value
assignment (ie. opt=val). This is the desired behavior for the -D option
of FileCheck for instance.

Copyright:
- Linaro (changes in version 2 of revision D55940)
- GraphCore (changes in later versions and introduced when creating
  D56549)

Reviewers: jdenny

Subscribers: llvm-commits, probinson, kristina, hiraditya,
JonChesterfield

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351038 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/CommandLine.h
lib/Support/CommandLine.cpp
unittests/Support/CommandLineTest.cpp