mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 17:32:19 +00:00
Fix a bug that caused opt and other tools to silently ignore
invalid command-line options. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47523 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b2a0abce1e
commit
61e015fe74
@ -127,7 +127,7 @@ static void GetOptionInfo(std::vector<Option*> &PositionalOpts,
|
||||
// Remember information about positional options.
|
||||
if (O->getFormattingFlag() == cl::Positional)
|
||||
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);
|
||||
else if (O->getNumOccurrencesFlag() == cl::ConsumeAfter) {
|
||||
if (CAOpt)
|
||||
|
3
test/Other/invalid-commandline-option.ll
Normal file
3
test/Other/invalid-commandline-option.ll
Normal file
@ -0,0 +1,3 @@
|
||||
; RUN: llvm-as < /dev/null | not opt --foo > /dev/null
|
||||
|
||||
; there is no --foo
|
Loading…
x
Reference in New Issue
Block a user