summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm/Support/CommandLine.h
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2014-01-29 18:54:17 +0000
committerJordan Rose <jordan_rose@apple.com>2014-01-29 18:54:17 +0000
commitc25b0c7e12c49ab4c0e728b2d4db00cfa3a66102 (patch)
treef5220c5bc4eb18a60213ed34e37f15eb21769e1a /llvm/include/llvm/Support/CommandLine.h
parentf24301d79cc6d8ff39409db81b8aacf6f4ba0eb0 (diff)
downloadbcm5719-llvm-c25b0c7e12c49ab4c0e728b2d4db00cfa3a66102.tar.gz
bcm5719-llvm-c25b0c7e12c49ab4c0e728b2d4db00cfa3a66102.zip
[CommandLine] Aliases require an value if their target requires a value.
This can still be overridden by explicitly setting a value requirement on the alias option, but by default it should be the same. PR18649 llvm-svn: 200407
Diffstat (limited to 'llvm/include/llvm/Support/CommandLine.h')
-rw-r--r--llvm/include/llvm/Support/CommandLine.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/include/llvm/Support/CommandLine.h b/llvm/include/llvm/Support/CommandLine.h
index 774c214933b..515b0bd00f9 100644
--- a/llvm/include/llvm/Support/CommandLine.h
+++ b/llvm/include/llvm/Support/CommandLine.h
@@ -249,6 +249,12 @@ public:
//
void addArgument();
+ /// Unregisters this option from the CommandLine system.
+ ///
+ /// This option must have been the last option registered.
+ /// For testing purposes only.
+ void removeArgument();
+
Option *getNextRegisteredOption() const { return NextRegistered; }
// Return the width of the option tag for printing...
@@ -1646,6 +1652,10 @@ class alias : public Option {
virtual void printOptionValue(size_t /*GlobalWidth*/,
bool /*Force*/) const LLVM_OVERRIDE {}
+ virtual ValueExpected getValueExpectedFlagDefault() const LLVM_OVERRIDE {
+ return AliasFor->getValueExpectedFlag();
+ }
+
void done() {
if (!hasArgStr())
error("cl::alias must have argument name specified!");
OpenPOWER on IntegriCloud