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)
commitbc5e6ee87a08618c3202eb1cecddd24267e64701
treed6f4a11189b1f68206ce2c0f397faa7715a7284b
parent4b7e12f2cfc8ec1eb0ea537371b8d2f499426655
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

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