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 /lib | |
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 'lib')
-rw-r--r-- | lib/Support/CommandLine.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Support/CommandLine.cpp b/lib/Support/CommandLine.cpp index 1b4d2c7287..16db4d6396 100644 --- a/lib/Support/CommandLine.cpp +++ b/lib/Support/CommandLine.cpp @@ -111,6 +111,13 @@ void Option::addArgument() { MarkOptionsChanged(); } +void Option::removeArgument() { + assert(NextRegistered != 0 && "argument never registered"); + assert(RegisteredOptionList == this && "argument is not the last registered"); + RegisteredOptionList = NextRegistered; + MarkOptionsChanged(); +} + // This collects the different option categories that have been registered. typedef SmallPtrSet<OptionCategory*,16> OptionCatSet; static ManagedStatic<OptionCatSet> RegisteredOptionCategories; |