llvm.org GIT mirror llvm / 61e015f
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 Dan Gohman 11 years ago
2 changed file(s) with 4 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
126126 // Remember information about positional options.
127127 if (O->getFormattingFlag() == cl::Positional)
128128 PositionalOpts.push_back(O);
129 else if (O->getMiscFlags() && cl::Sink) // Remember sink options
129 else if (O->getMiscFlags() & cl::Sink) // Remember sink options
130130 SinkOpts.push_back(O);
131131 else if (O->getNumOccurrencesFlag() == cl::ConsumeAfter) {
132132 if (CAOpt)
0 ; RUN: llvm-as < /dev/null | not opt --foo > /dev/null
1
2 ; there is no --foo