diff options
author | Jordan Rose <jordan_rose@apple.com> | 2014-01-29 18:54:17 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2014-01-29 18:54:17 +0000 |
commit | c2d631000d6018e8cd1734544d6c9980c6da5222 (patch) | |
tree | 2c0e4f5b571fca92adf68d051c94976bec915443 /include | |
parent | b492843e53dbc86a34bbddc4c8155f3d23e21185 (diff) | |
download | llvm-c2d631000d6018e8cd1734544d6c9980c6da5222.tar.gz llvm-c2d631000d6018e8cd1734544d6c9980c6da5222.tar.bz2 llvm-c2d631000d6018e8cd1734544d6c9980c6da5222.tar.xz |
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200407 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Support/CommandLine.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h index 774c214933..515b0bd00f 100644 --- a/include/llvm/Support/CommandLine.h +++ b/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!"); |