forked from OSchip/llvm-project
Fix a bug that caused opt and other tools to silently ignore
invalid command-line options. llvm-svn: 47523
This commit is contained in:
parent
4d17671997
commit
63d2d1f554
|
@ -127,7 +127,7 @@ static void GetOptionInfo(std::vector<Option*> &PositionalOpts,
|
||||||
// Remember information about positional options.
|
// Remember information about positional options.
|
||||||
if (O->getFormattingFlag() == cl::Positional)
|
if (O->getFormattingFlag() == cl::Positional)
|
||||||
PositionalOpts.push_back(O);
|
PositionalOpts.push_back(O);
|
||||||
else if (O->getMiscFlags() && cl::Sink) // Remember sink options
|
else if (O->getMiscFlags() & cl::Sink) // Remember sink options
|
||||||
SinkOpts.push_back(O);
|
SinkOpts.push_back(O);
|
||||||
else if (O->getNumOccurrencesFlag() == cl::ConsumeAfter) {
|
else if (O->getNumOccurrencesFlag() == cl::ConsumeAfter) {
|
||||||
if (CAOpt)
|
if (CAOpt)
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
; RUN: llvm-as < /dev/null | not opt --foo > /dev/null
|
||||||
|
|
||||||
|
; there is no --foo
|
Loading…
Reference in New Issue