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 | c25b0c7e12c49ab4c0e728b2d4db00cfa3a66102 (patch) | |
| tree | f5220c5bc4eb18a60213ed34e37f15eb21769e1a /llvm/lib/Support | |
| parent | f24301d79cc6d8ff39409db81b8aacf6f4ba0eb0 (diff) | |
| download | bcm5719-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/lib/Support')
| -rw-r--r-- | llvm/lib/Support/CommandLine.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp index 1b4d2c72875..16db4d63960 100644 --- a/llvm/lib/Support/CommandLine.cpp +++ b/llvm/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; |

