From c2d631000d6018e8cd1734544d6c9980c6da5222 Mon Sep 17 00:00:00 2001 From: Jordan Rose Date: Wed, 29 Jan 2014 18:54:17 +0000 Subject: [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 --- include/llvm/Support/CommandLine.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include') 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!"); -- cgit v1.2.3