[cfe-commits] r66784 - /cfe/trunk/lib/Driver/OptTable.cpp
Daniel Dunbar
daniel at zuster.org
Thu Mar 12 01:44:50 PDT 2009
Author: ddunbar
Date: Thu Mar 12 03:44:47 2009
New Revision: 66784
URL: http://llvm.org/viewvc/llvm-project?rev=66784&view=rev
Log:
Driver: '-' is parsed as an input.
Modified:
cfe/trunk/lib/Driver/OptTable.cpp
Modified: cfe/trunk/lib/Driver/OptTable.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/OptTable.cpp?rev=66784&r1=66783&r2=66784&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/OptTable.cpp (original)
+++ cfe/trunk/lib/Driver/OptTable.cpp Thu Mar 12 03:44:47 2009
@@ -124,8 +124,8 @@
unsigned IndexEnd) const {
const char *Str = Args.getArgString(Index);
- // Anything that doesn't start with '-' is an input.
- if (Str[0] != '-')
+ // Anything that doesn't start with '-' is an input, as is '-' itself.
+ if (Str[0] != '-' || Str[1] == '\0')
return new PositionalArg(getOption(OPT_INPUT), Index++);
for (unsigned j = OPT_UNKNOWN + 1; j < LastOption; ++j) {
More information about the cfe-commits
mailing list